MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / hover

Method hover

packages/core/src/simulator/simulator.ts:399–413  ·  view source on GitHub ↗
(e: MouseEvent)

Source from the content-addressed store, hash-verified

397 const doc = this.contentDocument!
398 const { detecting, dragon } = this.designer
399 const hover = (e: MouseEvent) => {
400 if (!detecting.enable || this.designMode !== 'design') {
401 return
402 }
403 const nodeInstance = this.getNodeInstanceFromElement(e.target as Element)
404 if (nodeInstance?.node) {
405 const { node } = nodeInstance
406 detecting.capture(node)
407 } else {
408 detecting.capture(null)
409 }
410 if (dragon.dragging) {
411 e.stopPropagation()
412 }
413 }
414 const leave = () => {
415 this.project.currentDocument && detecting.leave(this.project.currentDocument)
416 }

Callers

nothing calls this directly

Calls 2

captureMethod · 0.80

Tested by

no test coverage detected