mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Reenable touch events.
This commit is contained in:
parent
2eb72625d6
commit
4253479b75
@ -618,6 +618,8 @@ class Designer extends Events {
|
|||||||
// Render nodes ...
|
// Render nodes ...
|
||||||
nodesGraph.forEach((topic) => topic.setVisibility(true));
|
nodesGraph.forEach((topic) => topic.setVisibility(true));
|
||||||
|
|
||||||
|
// Enable workspace drag events ...
|
||||||
|
this._workspace.registerEvents();
|
||||||
// Finally, sort the map ...
|
// Finally, sort the map ...
|
||||||
EventBus.instance.fireEvent('forceLayout');
|
EventBus.instance.fireEvent('forceLayout');
|
||||||
this.fireEvent('loadSuccess');
|
this.fireEvent('loadSuccess');
|
||||||
|
@ -60,6 +60,16 @@ class Workspace {
|
|||||||
// Append to the workspace...
|
// Append to the workspace...
|
||||||
workspace.addItAsChildTo(divContainer);
|
workspace.addItAsChildTo(divContainer);
|
||||||
|
|
||||||
|
this.setZoom(zoom, true);
|
||||||
|
|
||||||
|
this._renderQueue = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
private _adjustWorkspace(): void {
|
||||||
|
this.setZoom(this._zoom, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
registerEvents() {
|
||||||
// Register drag events ...
|
// Register drag events ...
|
||||||
this._registerDragEvents();
|
this._registerDragEvents();
|
||||||
this._eventsEnabled = true;
|
this._eventsEnabled = true;
|
||||||
@ -68,14 +78,6 @@ class Workspace {
|
|||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this._adjustWorkspace();
|
this._adjustWorkspace();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.setZoom(zoom, true);
|
|
||||||
|
|
||||||
this._renderQueue = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
private _adjustWorkspace(): void {
|
|
||||||
this.setZoom(this._zoom, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isReadOnly(): boolean {
|
isReadOnly(): boolean {
|
||||||
@ -282,7 +284,7 @@ class Workspace {
|
|||||||
wasDragged = true;
|
wasDragged = true;
|
||||||
};
|
};
|
||||||
screenManager.addEvent('mousemove', workspace._mouseMoveListener);
|
screenManager.addEvent('mousemove', workspace._mouseMoveListener);
|
||||||
// screenManager.addEvent('touchmove', workspace._mouseMoveListener);
|
screenManager.addEvent('touchmove', workspace._mouseMoveListener);
|
||||||
|
|
||||||
// Register mouse up listeners ...
|
// Register mouse up listeners ...
|
||||||
workspace._mouseUpListener = () => {
|
workspace._mouseUpListener = () => {
|
||||||
@ -304,14 +306,14 @@ class Workspace {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
screenManager.addEvent('mouseup', workspace._mouseUpListener);
|
screenManager.addEvent('mouseup', workspace._mouseUpListener);
|
||||||
// screenManager.addEvent('touchend', workspace._mouseUpListener);
|
screenManager.addEvent('touchend', workspace._mouseUpListener);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
workspace._mouseUpListener();
|
workspace._mouseUpListener();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
screenManager.addEvent('mousedown', mouseDownListener);
|
screenManager.addEvent('mousedown', mouseDownListener);
|
||||||
// screenManager.addEvent('touchstart', mouseDownListener);
|
screenManager.addEvent('touchstart', mouseDownListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
getZoom() {
|
getZoom() {
|
||||||
|
Loading…
Reference in New Issue
Block a user