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

Magnifier Doesn't Suppress Turns #215

Open
scottfr opened this issue Jul 18, 2013 · 0 comments
Open

Magnifier Doesn't Suppress Turns #215

scottfr opened this issue Jul 18, 2013 · 0 comments

Comments

@scottfr
Copy link

scottfr commented Jul 18, 2013

When tapping a magnifier control, the page turn is not prevented.

This appears to be fixed by changing the magnifier constructor. Specifically changing the listenForTap call in createControlElements to a listenForContact call.

The result is:

function createControlElements(holder) {
    var btn = holder.dom.make('div', 'controls_magnifier_button');
    btn.smallA = btn.dom.append('span', 'controls_magnifier_a', { text: 'A' });
    btn.largeA = btn.dom.append('span', 'controls_magnifier_A', { text: 'A' });
    p.buttons.push(btn);
    Monocle.Events.listenForTap(btn, toggleMagnification);
    return btn;
  }

Becomes:

function createControlElements(holder) {
    var btn = holder.dom.make('div', 'controls_magnifier_button');
    btn.smallA = btn.dom.append('span', 'controls_magnifier_a', { text: 'A' });
    btn.largeA = btn.dom.append('span', 'controls_magnifier_A', { text: 'A' });
    p.buttons.push(btn);
    Monocle.Events.listenForContact(btn, {start:toggleMagnification});
    return btn;
  }
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

No branches or pull requests

1 participant