fix - function already exist in other file (sorry about that!)

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2277 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Rafael Couto 2013-01-16 00:31:32 +00:00
parent c659d36b88
commit 8823218968
1 changed files with 1 additions and 22 deletions

View File

@ -820,28 +820,7 @@
zoomDone();
}
//bad UA sniffing ...modernizr can't help https://github.com/Modernizr/Modernizr/wiki/Undetectables
var mouseWheelEvt=(/Firefox/i.test(navigator.userAgent))? "DOMMouseScroll" : "mousewheel"
$('#workarea').bind(mouseWheelEvt, function(e){
var evt = e.originalEvent;
var delta;
if (evt.wheelDelta) delta = Math.max(-1, Math.min(1, (evt.wheelDelta)));
else if (evt.detail) delta = Math.max(-1, Math.min(1, (-evt.detail)));
var zoom = Math.round((svgCanvas.getZoom() + delta * 0.05) * 100)/100;
var w_area = workarea;
zoomChanged(window, {
width: 0,
height: 0,
// center pt of scroll position
// should be relative to mouse position
x: (w_area[0].scrollLeft + w_area.width()/2)/zoom,
y: (w_area[0].scrollTop + w_area.height()/2)/zoom,
zoom: zoom
}, true);
if (evt.preventDefault) evt.preventDefault();
evt.returnValue = false;
});
$('#cur_context_panel').delegate('a', 'click', function() {
var link = $(this);