mousewheel

Enabling mouse wheel zooming in a Microsoft Chart Control

萝らか妹 提交于 2019-11-29 14:04:40
how to enable zooming in Microsoft chart control by using Mouse wheel I have the below code, i need to know how to make this event? in which class it is.. private void chData_MouseWheel(object sender, MouseEventArgs e) { try { if (e.Delta < 0) { chart1.ChartAreas[0].AxisX.ScaleView.ZoomReset(); chart1.ChartAreas[0].AxisY.ScaleView.ZoomReset(); } if (e.Delta > 0) { double xMin = chart1.ChartAreas[0].AxisX.ScaleView.ViewMinimum; double xMax = chart1.ChartAreas[0].AxisX.ScaleView.ViewMaximum; double yMin = chart1.ChartAreas[0].AxisY.ScaleView.ViewMinimum; double yMax = chart1.ChartAreas[0].AxisY

How to fire mouse wheel event in Firefox with JavaScript?

落花浮王杯 提交于 2019-11-29 06:08:02
问题 I'm trying to do automated testing with WebDriver, but it currently has no ability to simulate mouse wheel events. As a workaround I'm trying to fire these events with JavaScript instead. I'm doing all my wheel experimenting on a straight HTML page right now, not within the WebDriver framework. I'm specifically trying to fire a mouse wheel event on a scrolling div element. So far I've been able to do this with Chrome and IE9, but I can't seem to get anything to work in Firefox (5.x). I'm

How to Disable the Mouse wheel click Button?

那年仲夏 提交于 2019-11-29 04:51:44
I'm trying to find a way of disabling the default action of the mouse wheel button which is to open the link in a new tab. Is that possible? J.P. ten Berge Bind a generic click event handler that specifically checks for middle clicks . Within that event handler, call e.preventDefault() : $("#foo").on('click', function(e) { if( e.which == 2 ) { e.preventDefault(); } }); Note that not all browsers support preventing this default action. For me, it only works in Chrome. Firefox, Opera and IE9 all do not raise the click event with middle mouse click. They do raise mouseup and mousedown. This works

JQuery Mousewheel: How to disable?

假装没事ソ 提交于 2019-11-28 23:29:19
I am using jquery.mousewheel.js as a part of the jQuery jScrollPane plugin. I want to disable the mousewheel at some point. Could someone please recommend a jQuery statement that can do it? Thank you! Mrchief Something like this: $("#menu").bind("mousewheel", function() { return false; }); Try using .unmousewheel() , it should also work. odam.fm the container you must unbind is jspPane In my case i needed to disable it only in the boxes inside #myOuterContainer $('#myOuterContainer .jspPane').bind('mousewheel',function(){ return false; }); 来源: https://stackoverflow.com/questions/6702116/jquery

jQuery Tools Scrollable with Mousewheel - scroll ONE position and stop

给你一囗甜甜゛ 提交于 2019-11-28 23:24:17
问题 I am using bind/unbind for mousewheel scrolling, based on this SO response: Jquery, unbinding mousewheel event, then rebinding it after actions are completed? I'm tunneling up the event tree from delta, to target only the X mousewheel values. All is working well. The problem I'm trying to overcome: I want to simply scroll forward/backward ONE panel, then stop scrolling. Currently, I'm unbinding the mousewheel event immediately after the move, and that effectively stops the scrolling...but

firefox+jquery mousewheel scroll event bug

霸气de小男生 提交于 2019-11-28 23:09:59
UPDATE Working fix as suggested by David (see below): replace $('.scrollMe').bind("mousewheel DOMMouseScroll", ...) with $('.scrollMe').bind("mousewheel DOMMouseScroll MozMousePixelScroll", ...) ORIGINAL POST Firefox 16.0.2 (latest) shows an issue when binding the "mousewheel / DOMMouseScroll" event. Scrolling with the mousewheel while the mouse pointer is on top of my targeted div causes the window to scroll as well- whilst I obviously don't want this. I tried adding several methods to stop propagation etc. but nothing seems to work. Javascript code: $(document).ready(function() { $('

What is the height of a “line” in a wheel event? (deltaMode = DOM_DELTA_LINE)

痞子三分冷 提交于 2019-11-28 22:24:54
The wheel event in Firefox >= 17 has a deltaMode property. With the OS/mouse I'm using, it's set to 1 (or DOM_DELTA_LINE ). This setting means that the deltaX and deltaY event values are measured in lines and not pixels. Sure enough, if I pretend the deltas are pixels, scroll speeds are much slower than they normally are in Firefox. Chrome 31 by contrast uses a deltaMode of 0 (or DOM_DELTA_PIXEL ), which allows me to simulate scrolling with normal speeds. If I could convert the line values to pixel values, I'd be all set. But I can't find a scrap of documentation about what a "line" is. I

MouseWheel in Chrome and Firefox

前提是你 提交于 2019-11-28 22:02:42
I'm trying to handle the mouseWheel event in an advancedDataGrid with not success. Without any additional code my adg can be scrolled with the mouse in IE but not in firefox and Chrome, why? Why does it behave different in those browsers? Then I tried this code but it does not work: protected function adgMouseWheelHandler(event:MouseEvent):void { event.delta = event.delta > 0 ? 1 : -1; } and then setting the event mouseWheel in my adg like this: <mx:AdvancedDataGrid id="myADG" width="100%" height="100%" color="0x323232" dataProvider="{_currentDatosBusqueda}" verticalScrollPolicy="auto"

Detecting mousewheel on the x-axis (left and right) with Javascript

半城伤御伤魂 提交于 2019-11-28 17:56:26
I know it's possible to detect up and down e.g. function handle(delta) { if (delta < 0) { alert('down'); } else { alert('up'); } } function wheel(event){ var delta = 0; if (!event) event = window.event; if (event.wheelDelta) { delta = event.wheelDelta/120; } else if (event.detail) { delta = -event.detail/3; } if (delta) handle(delta); if (event.preventDefault) event.preventDefault(); event.returnValue = false; } /* Initialization code. */ if (window.addEventListener) window.addEventListener('DOMMouseScroll', wheel, false); window.onmousewheel = document.onmousewheel = wheel;​ But is there a

How do I speed up the scroll speed in a JScrollPane when using the mouse wheel?

若如初见. 提交于 2019-11-28 16:55:52
I see the method JScrollPane.setWheelScrollingEnabled(boolean) to enable or disable the mouse wheel scrolling. Is there any way to adjust the speed of the scrolling, though? It is, in my opinion, ludicrously slow. No matter what size I make the window, the scrolling is about three pixels per click. I'd like it to be much more than that. Any ideas? StKiller You can try this : myJScrollPane.getVerticalScrollBar().setUnitIncrement(16); One way would be to set the unit increment of the scrollbar to a larger number: scrollPane.getVerticalScrollBar().setUnitIncrement(20); If you want to set the