mouseevent

Angular 2 - Typescript: TS2322: Type 'Subscription' is not assignable to type 'Observable<MouseEvent>'

感情迁移 提交于 2019-12-07 15:50:14
问题 I am using the click-outside directive from this plunk --> http://embed.plnkr.co/v7BMUv/ My TS compiler is throwing the following errors: TS2322: Type 'Subscription' is not assignable to type 'Observable'. Property '_isScalar' is missing in type 'Subscription'. TS2339 Property 'unsubscribe' does not exist on type 'Observable'. My tsconfig.json: { "compileOnSave": false, "compilerOptions": { "target": "es6", "module": "system", "moduleResolution": "node", "sourceMap": true,

Can I detect if a user right clicked on a ListView column header in Winforms?

牧云@^-^@ 提交于 2019-12-07 15:28:53
问题 I don't mean the inside of the listview items but the column header that allows you to resize the column. 回答1: A simple UserControl overriding ListView 's OnMouseEnter OnMouseLeave & WndProc public partial class MyListView : ListView { public MyListView() { } public delegate void ColumnContextMenuHandler(object sender, ColumnHeader columnHeader); public event ColumnContextMenuHandler ColumnContextMenuClicked = null; bool _OnItemsArea = false; protected override void OnMouseEnter(EventArgs e)

jQuery: how to get the innermost dom element I'm hovering over, globally for the whole document body?

百般思念 提交于 2019-12-07 14:49:37
问题 I'd like to detect mouse movements over the whole document body, and be able to tell exactly which part of the DOM I'm hovering over. By "Which part" I mean the innermost DOM element that the mouse is currently over. I could bind a hover to the whole document body, but then the $(this) would give me the $(body), not the innermost element. Or I could iterate over the whole DOM recursively and bind a hover to each elements, but that would be a serious overkill IMO. Is there an easy way to

Dragging on force layout prevents other mouseup listeners

对着背影说爱祢 提交于 2019-12-07 14:21:35
问题 I want to enable dragging in a d3.js force layout. When dragging a circle and release the mouse button, I want to call a specific function via callback, like this: this.force = d3.layout.force() .nodes(this.nodes) .size([this.width, this.height]); // enable dragging this.circle .call(this.force.drag) .on("dragend", function() { console.log("You should see this, when releasing a circle."); }) .on("mouseup.drag",function(d,i) { console.log("Or see this."); }); Unfortunately the event is never

JavaFX KeyEvent not raised when dragging gesture active

不问归期 提交于 2019-12-07 14:21:21
问题 So my issue is this, I'm implementing a UI creation tool that requires elements to be resized using drag gestures on the edges. The problem arises when doing this drag while checking a modifier key is being pressed, i.e. to implement uniform scaling.The key event is never raised while the drag gesture is active so i cannot activate/deactivate this state during a drag, which is obviously not ideal! My question is, is there some reason in JavaFX why this is the case? Is there any workarounds?

mouseEntered event disabled when mouseDown (NSEvents Mac)

做~自己de王妃 提交于 2019-12-07 13:40:13
问题 I have created an NSButton class, and when rolling over my buttons it happily detects mouseEntered and mouseExited events. But as soon as the mouseDown event occurs, so long as the mouse it down, mouseEntered events are no longer called until the mouse button is lifted. So, when the mouseDown event is called, mouseEntered or MouseExited events are no longer called, nor is mouseDown called when rolling over other buttons until I let go of the initial mouseDown. So I would like to detect when

Hooking the 3rd X-Mouse button?

青春壹個敷衍的年華 提交于 2019-12-07 13:35:19
问题 I wrote a low-level mouse hook in C#, which should capture XBUTTON events. For the 1st and 2nd xButton it works just fine, but there is no message for the 3rd xButton on my mouse. It seems like there is no possible way to capture events for that button? I have a gaming mouse and there, between the two first xButtons, is a third xButton. When I click it, nothing happens, so I wanted to write a custom C# Mouse-Hook app to program a custom behaviour for that button... 回答1: That's correct. The

jquery: mouseout applies to nested elements

泄露秘密 提交于 2019-12-07 12:18:28
问题 ul with links nested in a div layer. mouse pointer goes over .title , ul is shown. the problem: mouseout() applies to nested elements mouseout() is for the div <div> <a class="title">Section A</a> <ul> <li><a href=''>link 1</a></li> <li><a href=''>link 2</a></li> <li><a href=''>link 3</a></li> </ul> </div> $('.title').mouseover(function() { $('ul').slideDown(); }) $('div').mouseout(function(){ $('ul').slideUp(); }); 回答1: Try $('selector').mouseleave(function(){}); 来源: https://stackoverflow

JS special mouse buttons

帅比萌擦擦* 提交于 2019-12-07 10:01:38
问题 My mouse has two buttons on the side, whose default behaviour are "Back" and "Forward". What I'd like to know is whether or not it's possible to detect clicks of these mouse buttons in JavaScript, or if these are "special" buttons akin to the keyboard's "Play", "Volume Up" and "Wireless on/off" buttons. 回答1: I am not aware of any specific mouse events. You can, however, easily find out yourself by inspecting the event object of the mousedown event. Fullscreen fiddle: http://jsfiddle.net/dWfDL

-mouseMoved OSX does not get called in a sprite kit SKScene

核能气质少年 提交于 2019-12-07 09:44:23
问题 The following responder (defined in NSResponder) does not get called in an SKScene in OSX: -(void) mouseMoved:(NSEvent *)theEvent { DLog(@"TEST"); } I have said the window to accept mouse moved events in the app delegate. _window.acceptsMouseMovedEvents = YES; Thank you in advance. SOLUTION: Add to the app delegate: _window.acceptsMouseMovedEvents = YES; [_window makeFirstResponder:self.skView.scene]; 回答1: Add to the app delegate: _window.acceptsMouseMovedEvents = YES; [_window