Fix spinner dialog on map load.

Approved-by: Paulo Veiga
This commit is contained in:
Matias Arriola 2022-01-04 16:47:56 +00:00 committed by Paulo Veiga
parent 5c5aefea64
commit 706a440d97

View File

@ -16,7 +16,6 @@
* limitations under the License. * limitations under the License.
*/ */
import { $assert, $defined } from '@wisemapping/core-js'; import { $assert, $defined } from '@wisemapping/core-js';
import $ from 'jquery';
import Messages, { $msg } from './Messages'; import Messages, { $msg } from './Messages';
import Events from './Events'; import Events from './Events';
@ -117,14 +116,14 @@ class Designer extends Events {
const zoomFactor = 1.006; const zoomFactor = 1.006;
const me = this; const me = this;
// Zoom In and Zoom Out must active event // Zoom In and Zoom Out must active event
$(document).on('mousewheel', (event) => { document.addEventListener('wheel', (event) => {
if (event.deltaY > 0) { if (event.deltaX > 0 || event.deltaY > 0) {
me.zoomIn(zoomFactor); me.zoomIn(zoomFactor);
} else { } else {
me.zoomOut(zoomFactor); me.zoomOut(zoomFactor);
} }
event.preventDefault(); event.preventDefault();
}); }, { passive: false });
} }
/** /**