Skip to content

Commit

Permalink
chore(search): replace webview-ui-toolkit for reports
Browse files Browse the repository at this point in the history
  • Loading branch information
mbehr1 committed Jan 14, 2025
1 parent ea5c223 commit 8523a06
Show file tree
Hide file tree
Showing 6 changed files with 935 additions and 845 deletions.
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ esbuild.js
node_modules
!node_modules/node-adlt
!node_modules/@vscode/codicons/dist
!node_modules/@vscode/webview-ui-toolkit/dist
!node_modules@vscode-elements/elements/dist
!node_modules/moment/min
!node_modules/chart.js/dist
!node_modules/chartjs-adapter-moment/dist
Expand Down
38 changes: 20 additions & 18 deletions media/regularGraphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,24 +547,26 @@ const graphConfigTemplate = {
let anDi = document.getElementById("editAnnotation");
editAnnotationObj = selectedTimeAnnotations.find(t => (t.id === context.element.options.id));
if (editAnnotationObj) {
anDi.style.display = "block";
anDi.style.top = event.native.y + "px";
anDi.style.left = event.native.x + "px";

let btnPin = document.getElementById("editAnnotationPinBtn");
let btnUnpin = document.getElementById("editAnnotationUnpinBtn");

let textDesc = document.getElementById("editAnnotationDesc");
const curDesc = editAnnotationObj.desc_;
textDesc.value = curDesc !== undefined ? curDesc : "";

if (editAnnotationObj.pinned_) {
btnPin.style.display = "none";
btnUnpin.style.display = "";
} else {
btnUnpin.style.display = "none";
btnPin.style.display = "";
}
anDi.style.display = 'block'
anDi.style.top = event.native.y + 'px'
anDi.style.left = event.native.x + 'px'

let btnPin = document.getElementById('editAnnotationPinBtn')
let btnUnpin = document.getElementById('editAnnotationUnpinBtn')

let textDesc = document.getElementById('editAnnotationDesc')
const curDesc = editAnnotationObj.desc_
textDesc.value = curDesc !== undefined ? curDesc : ''

if (editAnnotationObj.pinned_) {
btnPin.style.display = 'none'
btnUnpin.style.display = ''
} else {
btnUnpin.style.display = 'none'
btnPin.style.display = ''
}
} else {
//console.warn(`annotation click: no editAnnotationObj found for id=${context.element.options.id}`)
}
},
},
Expand Down
Loading

0 comments on commit 8523a06

Please sign in to comment.