Skip to content

Commit

Permalink
Merge pull request #1751 from xeokit/include-os-in-example
Browse files Browse the repository at this point in the history
Import os in context menu example
  • Loading branch information
xeolabs authored Dec 2, 2024
2 parents edb33e6 + 1f7f4ed commit a4b732b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h3>Resources</h3>
// Import the modules we need for this example
//------------------------------------------------------------------------------------------------------------------

import {Viewer, XKTLoaderPlugin, ContextMenu, TreeViewPlugin} from "../../dist/xeokit-sdk.min.es.js";
import {Viewer, XKTLoaderPlugin, ContextMenu, TreeViewPlugin, os} from "../../dist/xeokit-sdk.min.es.js";

//------------------------------------------------------------------------------------------------------------------
// Helping variables
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/lib/html/MenuEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ export function addContextMenuListener(elem, callback) {
event.preventDefault();
event.stopPropagation();
};

console.log('adding context menu listener');

if (os.isIphoneSafari()) {
elem.addEventListener('touchstart', touchStartHandler);
elem.addEventListener('touchmove', touchMoveHandler);
Expand Down

0 comments on commit a4b732b

Please sign in to comment.