Questions tagged [onmousemove]

The "onmousemove" event is a event that is triggered when the user moves the mouse pointer on an element.

Definition:

The onmousemove property is a JavaScript property which triggers the mousemove event when the user moves the mouse over an object.

Example Usage:

document.getElementById( '#example' ).onmousemove = function ()
{
    console.log( 'The onmousemove event has fired.' );
};

Important Links:

199 questions
2
votes
1 answer

Can WPF User Control Detect MouseMovement when Mouse outside of UC Area

I'm writing a WPF app whereby usercontrols are being dynamically created programmatically in response to an event. The main window canvas has a grid, and i'm adding new columndefs and rowdefs, which contain the new user controls. I need these user…
Jeeby
  • 1,464
  • 1
  • 25
  • 30
2
votes
2 answers

CSS js on mousemove redraw without disappear

I drawing circle with CSS on the window by mouse position. Then i move cursor slowly nice redrawing, but if i move cursor faster i can see how circle disappearing. How i can redraw smoothly without disappear? My code what i trying below: .circle { …
Your choice
  • 395
  • 12
  • 25
2
votes
0 answers

Pausing mouse interaction / Locking all items

I'm trying to understand how to pause and resume interaction in paper.js. I have the metaball example on a page with an input element on top, and because paper.js steals focus for driving the metaball generation onMouseMove... bad things happen.…
user2667089
2
votes
2 answers

How do I detect when the mouse is no longer in a control?

I have put images (TImage) as buttons in my program. I want to add some extra effects, so in OnMouseMove (whenever the user moves his mouse over the image) the image is replaced by another image in order to give the extra effect: procedure…
user2242090
  • 37
  • 1
  • 2
  • 6
1
vote
1 answer

Performance issue of DrawingVisual following cursor while using onMouseMove event

I'm busy with a small application in which I want to display information at the location of the cursor when it hoovers over a Canvas. The Canvas in question is a custom one (inherited from Canvas) which provides functionality to add DrawingVisuals…
Geoffrey
  • 956
  • 1
  • 10
  • 16
1
vote
2 answers

image change on onmouseover, onmouseout, onclick events

I have a two images say, img1 and img2. My Code : function roll(id,img_name,event_name,img_id) { var state ; if(event_name == 'mouseover') { state = false;rollover();} else if(event_name == 'mouseout') {state =…
Khushi
1
vote
2 answers

How to get Mouse Cursor Position on Form in a Python FMX GUI App?

I've built a simple Form using the DelphiFMX GUI Library for Python. The Form has a MouseMove event attached to it. What I basically want is the X and Y coordinates of the mouse on the Form when you move the mouse around and then display the…
Shaun Roselt
  • 1,650
  • 5
  • 18
  • 44
1
vote
1 answer

Why are State Updater Functions Faster Than Setting State to Plain Values?

For context, I have a web app that displays an image in a React-Bootstrap Container component (Arena) that holds an image where users are to look and find specific characters. Separately, I created a div component (CustomCursor) where the background…
1
vote
0 answers

How to sync cursor and axises for two chart regions in MFC application

I have MFC project, which has two chart on dialog window. I am trying to synchronize cursor movement between those two charts. So when I move cursor over one chart, second chart tracks this mouse movement and have its cursor follow same path. I use…
id347627
  • 46
  • 5
1
vote
0 answers

React hook causing slow render on mousemove

I'm using React & TypeScript in a project and recently pieced together the following hook: export const useDrag = (selectionRef: React.MutableRefObject) => { const [dragStart, setDragStart] = useState(null); const…
1
vote
0 answers

mouseMove only triggers after mouseClick

I'm writing a simple cursor record webpage with Reactjs, the problem is the records array only updates whenever I click the button while my intention for it is to continuously update on mouse move. The logic actually works fine on raw javascript,…
1
vote
1 answer

"Cannot read property 'style' of undefined" onmousemove

So on my website, I want some text to follow my cursor. I use the following JS: var balls = document.getElementsByClassName("text1"); document.onmousemove = function(){ var x = event.clientX * 100 / window.innerWidth + "%"; var y =…
Garb o' Donk
  • 53
  • 1
  • 3
1
vote
0 answers

Manipulating SVG Anchors with mouse-movement

I'm wondering about the following challenge: Is it possible to manipulate anchor points of a rather simple svg-shape when moving the mouse? This is my SVG Shape:
matt
  • 42,713
  • 103
  • 264
  • 397
1
vote
2 answers

Changing text color under circle following cursor

I need to change color of text under circle that follows mouse cursor. I coded circle to follow cursor but I don't know how I can change color of text under the circle. I would like color to be changed to background color of header. My…
Lidia K.
  • 209
  • 3
  • 13
1
vote
1 answer

Firefox preventDefault on mousemove doesn't work

This simple piece of code works in Chromium but not in Firefox. Why, and what's the best way to disable page interaction while moving the mouse. I'm trying to implement drag and drop, and I want to disable interactions while…
Paul
  • 6,061
  • 6
  • 39
  • 70