Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

AlexWayOfElendil
Copy link

No description provided.

index.js Outdated Show resolved Hide resolved
setup.js Outdated Show resolved Hide resolved
index.js Outdated
Comment on lines 65 to 70
$(containerSelector + ' canvas').firstOn('dblclick', (event) => {
if ( window.fullScreenDisabled === true) event.stopImmediatePropagation();
})
$(containerSelector + ' canvas').firstOn('DOMMouseScroll mousewheel', (event) => {
if ( window.zoomDisabled === true) event.stopImmediatePropagation();
})
Copy link
Owner

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

Copy link
Owner

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) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsDoc and comments please

Comment on lines +82 to +85
Array.prototype.splice.apply(
curEventListeners,
[0, curEventListeners.delegateCount].concat(delegatedListeners)
)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Array.prototype.splice.apply(
curEventListeners,
[0, curEventListeners.delegateCount].concat(delegatedListeners)
)
curEventListeners.splice(0, curEventListeners.delegateCount, ...delegatedListeners);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants