@@ -223,6 +223,7 @@ export const interactionMethods = {
223223 } ,
224224
225225 scheduleCanvasPointerDrag ( eMove , activeCanvas ) {
226+ this . normalizeVueCompatPointerEvent ?. ( eMove ) ;
226227 this . _pendingCanvasPointerDragEvent = eMove ;
227228 this . _pendingCanvasPointerDragCanvas = activeCanvas ;
228229 if ( this . _pendingCanvasPointerDragFrame !== null ) return ;
@@ -290,12 +291,15 @@ export const interactionMethods = {
290291 || null ;
291292
292293 pointer . onDrag = ( eMove ) => {
294+ this . normalizeVueCompatPointerEvent ?. ( eMove ) ;
293295 this . scheduleCanvasPointerDrag ( eMove , activeCanvas ) ;
294296 } ;
295297 pointer . finally = ( ) => {
296298 this . flushCanvasPointerDrag ( ) ;
297299 if ( this . node ?. capture ) {
298- this . handleMouseUp ( pointer . eUp || pointer . eMove || pointer . eDown ) ;
300+ const finalEvent = pointer . eUp || pointer . eMove || pointer . eDown ;
301+ this . normalizeVueCompatPointerEvent ?. ( finalEvent ) ;
302+ this . handleMouseUp ( finalEvent ) ;
299303 }
300304 this . _usingCanvasPointerCallbacks = false ;
301305 this . _capturedPointerCanvas = null ;
@@ -507,7 +511,7 @@ export const interactionMethods = {
507511 if ( newHover !== this . hoverElement ) {
508512 this . hoverElement = newHover ;
509513 this . handleTooltipHover ( newHover , e ) ;
510- this . app ?. graph ?. setDirtyCanvas ( true ) ;
514+ this . requestCanvasUpdate ( true ) ;
511515 }
512516 } ,
513517
@@ -519,15 +523,15 @@ export const interactionMethods = {
519523 if ( this . showTooltip ) {
520524 this . showTooltip = false ;
521525 this . tooltipElement = null ;
522- this . app ?. graph ?. setDirtyCanvas ( true ) ;
526+ this . requestCanvasUpdate ( true ) ;
523527 }
524528 if ( element && this . tooltips [ element ] ) {
525529 const initialMousePos = { x : e . canvasX , y : e . canvasY } ;
526530 this . tooltipTimer = setTimeout ( ( ) => {
527531 this . tooltipElement = element ;
528532 this . showTooltip = true ;
529533 this . tooltipFixedPos = initialMousePos ;
530- this . app ?. graph ?. setDirtyCanvas ( true ) ;
534+ this . requestCanvasUpdate ( true ) ;
531535 } , this . tooltipDelay ) ;
532536 }
533537 } ,
@@ -711,14 +715,14 @@ export const interactionMethods = {
711715 const widget = this . node . widgets ?. find ( w => w . name === 'auto_detect' ) ;
712716 if ( widget ) widget . value = props . autoDetect ;
713717 this . syncBackendFallbackWidgets ( ) ;
714- this . app ?. graph ?. setDirtyCanvas ( true ) ;
718+ this . requestCanvasUpdate ( true ) ;
715719 } else if ( toggleName === 'smartFitToggle' && props . selectedCategory ) {
716720 props . smartFit = ! props . smartFit ;
717721 this . syncBackendFallbackWidgets ( ) ;
718- this . app ?. graph ?. setDirtyCanvas ( true ) ;
722+ this . requestCanvasUpdate ( true ) ;
719723 } else if ( toggleName === 'calcInfoToggle' && props . selectedCategory ) {
720724 props . showCalcInfo = ! props . showCalcInfo ;
721- this . app ?. graph ?. setDirtyCanvas ( true ) ;
725+ this . requestCanvasUpdate ( true ) ;
722726 }
723727 } ,
724728
@@ -737,7 +741,7 @@ export const interactionMethods = {
737741 }
738742 this . syncBackendFallbackWidgets ( ) ;
739743 this . updateRescaleValue ( ) ;
740- this . app ?. graph ?. setDirtyCanvas ( true ) ;
744+ this . requestCanvasUpdate ( true ) ;
741745 } ,
742746
743747 handleRadioClick ( radioName ) {
@@ -749,7 +753,7 @@ export const interactionMethods = {
749753 } ;
750754 props . rescaleMode = radioMap [ radioName ] ;
751755 this . updateRescaleValue ( ) ;
752- this . app ?. graph ?. setDirtyCanvas ( true ) ;
756+ this . requestCanvasUpdate ( true ) ;
753757 } ,
754758
755759 handleSectionHeaderClick ( headerKey ) {
@@ -764,7 +768,7 @@ export const interactionMethods = {
764768 this . userPreferredHeight = this . getStoredPreferredHeight ( this . collapsedSections . extraControls ) ;
765769 this . applyCompactSlotLabels ( ) ;
766770 }
767- this . app ?. graph ?. setDirtyCanvas ( true , true ) ;
771+ this . requestCanvasUpdate ( true ) ;
768772
769773 log . debug ( `Section ${ sectionKey } ${ this . collapsedSections [ sectionKey ] ? 'collapsed' : 'expanded' } ` ) ;
770774 } ,
@@ -803,7 +807,7 @@ export const interactionMethods = {
803807 }
804808 }
805809
806- this . app ?. graph ?. setDirtyCanvas ( true ) ;
810+ this . requestCanvasUpdate ( true ) ;
807811 } ,
808812
809813 showPresetSelector ( e , mode ) {
@@ -884,7 +888,7 @@ export const interactionMethods = {
884888 if ( selectedType && this . latentTypeWidget ) {
885889 this . latentTypeWidget . value = selectedType . value ;
886890 log . debug ( `Latent type manually changed to: ${ selectedType . value } ` ) ;
887- this . app ?. graph ?. setDirtyCanvas ( true ) ;
891+ this . requestCanvasUpdate ( true ) ;
888892 }
889893 }
890894 } ) ;
@@ -918,7 +922,7 @@ export const interactionMethods = {
918922 props . selectedPreset = null ;
919923 this . syncBackendFallbackWidgets ( ) ;
920924 this . updateRescaleValue ( ) ;
921- this . app ?. graph ?. setDirtyCanvas ( true ) ;
925+ this . requestCanvasUpdate ( true ) ;
922926 } ;
923927 } else if ( dropdownName === 'presetDropdown' && props . selectedCategory ) {
924928 const selectorMode = props . preset_selector_mode || 'visual' ;
@@ -935,7 +939,7 @@ export const interactionMethods = {
935939 }
936940 props . targetResolution = parseInt ( resolutionValue ) ;
937941 this . updateRescaleValue ( ) ;
938- this . app ?. graph ?. setDirtyCanvas ( true ) ;
942+ this . requestCanvasUpdate ( true ) ;
939943 } ;
940944 }
941945
0 commit comments