mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-12-22 19:53:49 +01:00
Remove Browser object
This commit is contained in:
parent
c2189a31fa
commit
76dcadccd6
@ -9,8 +9,6 @@
|
||||
"plugin:cypress/recommended"
|
||||
],
|
||||
"globals": {
|
||||
// Browser is a mootools polyfill. Remove when moving from browser checks to feature detection
|
||||
"Browser": true,
|
||||
// designer is a global currently used as a hack. Remove this when fixing the hack.
|
||||
"designer": true
|
||||
},
|
||||
|
@ -81,8 +81,8 @@ class DragTopic {
|
||||
}
|
||||
|
||||
updateFreeLayout(event) {
|
||||
const isFreeEnabled = (event.metaKey && Browser.Platform.mac)
|
||||
|| (event.ctrlKey && !Browser.Platform.mac);
|
||||
const isMac = window.navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
||||
const isFreeEnabled = (event.metaKey && isMac) || (event.ctrlKey && !isMac);
|
||||
|
||||
if (this.isFreeLayoutOn() !== isFreeEnabled) {
|
||||
const dragPivot = this._getDragPivot();
|
||||
|
@ -640,13 +640,11 @@ class Topic extends NodeGraph {
|
||||
const me = this;
|
||||
// Focus events ...
|
||||
elem.addEvent('mousedown', (event) => {
|
||||
const isMac = window.navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
||||
if (!me.isReadOnly()) {
|
||||
// Disable topic selection of readOnly mode ...
|
||||
let value = true;
|
||||
if (
|
||||
(event.metaKey && Browser.Platform.mac)
|
||||
|| (event.ctrlKey && !Browser.Platform.mac)
|
||||
) {
|
||||
if ((event.metaKey && isMac) || (event.ctrlKey && !isMac)) {
|
||||
value = !me.isOnFocus();
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
@ -178,11 +178,7 @@ class Workspace {
|
||||
workspace.setCoordOrigin(coordOriginX, coordOriginY);
|
||||
|
||||
// Change cursor.
|
||||
if (Browser.firefox) {
|
||||
window.document.body.style.cursor = '-moz-grabbing';
|
||||
} else {
|
||||
window.document.body.style.cursor = 'move';
|
||||
}
|
||||
window.document.body.style.cursor = 'move';
|
||||
mouseMoveEvent.preventDefault();
|
||||
|
||||
// Fire drag event ...
|
||||
|
Loading…
Reference in New Issue
Block a user