-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add disableZoom and disableFullScreen options #61
base: master
Are you sure you want to change the base?
add disableZoom and disableFullScreen options #61
Conversation
index.js
Outdated
$(containerSelector + ' canvas').firstOn('dblclick', (event) => { | ||
if ( window.fullScreenDisabled === true) event.stopImmediatePropagation(); | ||
}) | ||
$(containerSelector + ' canvas').firstOn('DOMMouseScroll mousewheel', (event) => { | ||
if ( window.zoomDisabled === true) event.stopImmediatePropagation(); | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should put this in class WowModelViewer
On a same webpage you can have multiple models.
Ex a mount and pet shop and maybe you will not want to make the same restriction on all elements
The model viewer can display:
- Characters
- NPCs
- Creatures
- Mounts
- Pets
- Items
- Game objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean not using window
@@ -59,3 +65,42 @@ const WH = window.WH | |||
export { | |||
WH, | |||
} | |||
|
|||
function firstOnApply (opts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsDoc and comments please
Array.prototype.splice.apply( | ||
curEventListeners, | ||
[0, curEventListeners.delegateCount].concat(delegatedListeners) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array.prototype.splice.apply( | |
curEventListeners, | |
[0, curEventListeners.delegateCount].concat(delegatedListeners) | |
) | |
curEventListeners.splice(0, curEventListeners.delegateCount, ...delegatedListeners); |
No description provided.