mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-08-20 04:30:42 +02:00
zoom factor decreased, fixing some js errors due to legacy code
This commit is contained in:
parent
feae417221
commit
59c4330f4f
@ -82,32 +82,14 @@ mindplot.Designer = new Class(/** @lends Designer */{
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_registerWheelEvents: function () {
|
_registerWheelEvents: function () {
|
||||||
var workspace = this._workspace;
|
var zoomFactor = 1.006;
|
||||||
var me = this;
|
var me = this;
|
||||||
// Zoom In and Zoom Out must active event
|
// Zoom In and Zoom Out must active event
|
||||||
$(document).on('mousewheel', function (event) {
|
$(document).on('mousewheel', function (event) {
|
||||||
// Change mousewheel handling so we let the default
|
|
||||||
// event happen if we are outside the container. -> FIXME: it still happening?
|
|
||||||
/*var coords = screenManager.getContainer().getCoordinates();
|
|
||||||
var isOutsideContainer = event.client.y < coords.top ||
|
|
||||||
event.client.y > coords.bottom ||
|
|
||||||
event.client.x < coords.left ||
|
|
||||||
event.client.x > coords.right;
|
|
||||||
|
|
||||||
if (!isOutsideContainer) {
|
|
||||||
if (event.wheel > 0) {
|
|
||||||
this.zoomIn(1.05);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.zoomOut(1.05);
|
|
||||||
}
|
|
||||||
event.preventDefault();
|
|
||||||
}*/
|
|
||||||
if (event.deltaY > 0) {
|
if (event.deltaY > 0) {
|
||||||
me.zoomIn(1.05);
|
me.zoomIn(zoomFactor);
|
||||||
}
|
} else {
|
||||||
else {
|
me.zoomOut(zoomFactor);
|
||||||
me.zoomOut(1.05);
|
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
@ -58,14 +58,6 @@
|
|||||||
var persistence = mindplot.PersistenceManager.getInstance();
|
var persistence = mindplot.PersistenceManager.getInstance();
|
||||||
var mindmap = mindmap = persistence.load(mapId);
|
var mindmap = mindmap = persistence.load(mapId);
|
||||||
designer.loadMap(mindmap);
|
designer.loadMap(mindmap);
|
||||||
|
|
||||||
$('zoomIn').addEvent('click', function () {
|
|
||||||
designer.zoomIn();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('zoomOut').addEvent('click', function () {
|
|
||||||
designer.zoomOut();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
@ -90,14 +90,6 @@
|
|||||||
var persistence = mindplot.PersistenceManager.getInstance();
|
var persistence = mindplot.PersistenceManager.getInstance();
|
||||||
var mindmap = mindmap = persistence.load(mapId);
|
var mindmap = mindmap = persistence.load(mapId);
|
||||||
designer.loadMap(mindmap);
|
designer.loadMap(mindmap);
|
||||||
|
|
||||||
$('zoomIn').addEvent('click', function () {
|
|
||||||
designer.zoomIn();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('zoomOut').addEvent('click', function () {
|
|
||||||
designer.zoomOut();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
Reference in New Issue
Block a user