PennController for IBEX › Forums › Support › MouseTracker only while dragging for use with DragDrop › Reply To: MouseTracker only while dragging for use with DragDrop
July 20, 2022 at 5:41 pm
#8294
Jeremy
Keymaster
Hi,
My initial suggestion was to use a Selector element to detect a click on the word, and start the MouseTracker element then, but it turns out that selector.callback
also fires only after the click has been released, which defeats the purpose
At this point, you’re better off injecting a javascript function using the Function element:
newMouseTracker("mouse").log() , newFunction( async ()=> { await new Promise(r=>getText("word")._element.jQueryContainer.mousedown(r)); getMouseTracker("mouse").start()._runPromises(); }) .call() ,
Jeremy