mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-02 00:15:12 +02:00
Merge pull request #3153 from kepta/d3-mousewheeled-fix
D3 mousewheeled fix
This commit is contained in:
@@ -315,7 +315,7 @@ D3_FILES = \
|
||||
|
||||
d3:
|
||||
node_modules/.bin/smash $(D3_FILES) > js/lib/d3.v3.js
|
||||
@echo 'd3 rebuilt. Please reapply 7e2485d, 4da529f, and 223974d'
|
||||
@echo 'd3 rebuilt. Please reapply 7e2485d, 4da529f, 223974d and 71a3d3e'
|
||||
|
||||
lodash:
|
||||
node_modules/.bin/lodash --development --output js/lib/lodash.js include="includes,toPairs,assign,bind,chunk,clone,compact,debounce,difference,each,every,extend,filter,find,first,forEach,forOwn,groupBy,indexOf,intersection,isEmpty,isEqual,isFunction,keys,last,map,omit,reject,some,throttle,union,uniq,values,without,flatten,value,chain,cloneDeep,merge,pick,reduce" exports="global,node"
|
||||
|
||||
Vendored
+2
-3
@@ -1820,8 +1820,7 @@ d3.behavior.zoom = function() {
|
||||
}
|
||||
|
||||
function zoomended(dispatch) {
|
||||
if (!--zooming) dispatch({type: "zoomend"});
|
||||
center0 = null;
|
||||
if (!--zooming) dispatch({type: "zoomend"}), center0 = null;
|
||||
}
|
||||
|
||||
function mousedowned() {
|
||||
@@ -1964,7 +1963,7 @@ d3.behavior.zoom = function() {
|
||||
function mousewheeled() {
|
||||
var dispatch = event.of(this, arguments);
|
||||
if (mousewheelTimer) clearTimeout(mousewheelTimer);
|
||||
else translate0 = location(center0 = center || d3.mouse(this)), d3_selection_interrupt.call(this), zoomstarted(dispatch);
|
||||
else d3_selection_interrupt.call(this), translate0 = location(center0 = center || d3.mouse(this)), zoomstarted(dispatch);
|
||||
mousewheelTimer = setTimeout(function() { mousewheelTimer = null; zoomended(dispatch); }, 50);
|
||||
d3_eventPreventDefault();
|
||||
scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k);
|
||||
|
||||
Reference in New Issue
Block a user