@@ -162,7 +162,7 @@ limitations under the License. -->
162162 anchor .value = graph .value .append (" g" ).selectAll (" .topo-line-anchor" );
163163 arrow .value = graph .value .append (" g" ).selectAll (" .topo-line-arrow" );
164164 svg .value .call (zoom (d3 , graph .value , [- 100 , - 100 ]));
165- svg .value .on (" click" , (event : any ) => {
165+ svg .value .on (" click" , (event : PointerEvent ) => {
166166 event .stopPropagation ();
167167 event .preventDefault ();
168168 topologyStore .setNode (null );
@@ -218,11 +218,11 @@ limitations under the License. -->
218218 simulation .value .alphaTarget (0 );
219219 }
220220 }
221- function handleNodeClick(d : Node & { x: number ; y: number }) {
221+ function handleNodeClick(event : PointerEvent , d : Node & { x: number ; y: number }) {
222222 topologyStore .setNode (d );
223223 topologyStore .setLink (null );
224- operationsPos .x = d . x - 100 ;
225- operationsPos .y = d . y - 70 ;
224+ operationsPos .x = event . offsetX ;
225+ operationsPos .y = event . offsetY ;
226226 if (d .layer === String (dashboardStore .layerId )) {
227227 return ;
228228 }
@@ -231,7 +231,7 @@ limitations under the License. -->
231231 { id: " alarm" , title: " Alarm" , func: handleGoAlarm },
232232 ];
233233 }
234- function handleLinkClick(event : any , d : Call ) {
234+ function handleLinkClick(event : PointerEvent , d : Call ) {
235235 if (d .source .layer !== dashboardStore .layerId || d .target .layer !== dashboardStore .layerId ) {
236236 return ;
237237 }
0 commit comments