Disable map dragging ONLY when touch - sliding transparency sliderDisable panning/dragging on leaflet map for...
Do these large-scale, human power-plant-tending robots from the Matrix movies have a name, in-universe or out?
How can I make my enemies feel real and make combat more engaging?
Calculating total "on row" bytes for each row ... the easy way
Multiple null checks in Java 8
Aliased pipeline using head and cut
What does @ mean in a hostname in DNS configuration?
What does it mean when an external ID field follows a DML Statement?
Will linear voltage regulator step up current?
How do I handle a blinded enemy which wants to attack someone it's sure is there?
Now...where was I?
Is Screenshot Time-tracking Common?
How to typeset a small black square as a binary operator?
Can you wish for more wishes from an Efreeti bound to service via an Efreeti Bottle?
Exploding Numbers
Variance of sine and cosine of a random variable
Is it common to refer to someone as "Prof. Dr. [LastName]"?
How can changes in personality/values of a person who turned into a vampire be explained?
Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded
How do I avoid the "chosen hero" feeling?
How do I add a strong "onion flavor" to the biryani (in restaurant style)?
Taking an academic pseudonym?
Euler and minus sign
Can I legally make a website about boycotting a certain company?
Question: "Are you hungry?" Answer: "I feel like eating."
Disable map dragging ONLY when touch - sliding transparency slider
Disable panning/dragging on leaflet map for div within mapLeaflet: my map is moving when popups openDisable feature popup when creating new simple markerMoving map content/ map signatures when zoomLeaflet not registering touch events on static map?Leaflet: Markers hidden when panning mapLeaflet map scrolled when dragging the page on mobileDisplay a map bounds-based rectangle while draggingDisable map panning using the arrow keys in the keyboardDragging and dropping images into Leaflet map to create image markers?
I am wondering if anyone knows how to replicate this, but specifically with touchscreens in mind:
//disable dragging when cursor is over the element
opacitySlider.getContainer().addEventListener('mouseover', function () {
map.dragging.disable();
});
// Re-enable dragging when user's cursor leaves the element
opacitySlider.getContainer().addEventListener('mouseout', function () {
map.dragging.enable();
});
It seems like when I search around, I find info on how to disable dragging entirely, or disable anytime on mobile -- I don't want to do that.
I have the functionality working well when it is linked to a mouseover event (example above) -- I just need to know how to do the same exact thing, but when an opacity/transparency slider is being engaged with on any kind of touch screen. This map is being designed for large, touchscreen digital signage.
Thank you for reading!
leaflet
New contributor
add a comment |
I am wondering if anyone knows how to replicate this, but specifically with touchscreens in mind:
//disable dragging when cursor is over the element
opacitySlider.getContainer().addEventListener('mouseover', function () {
map.dragging.disable();
});
// Re-enable dragging when user's cursor leaves the element
opacitySlider.getContainer().addEventListener('mouseout', function () {
map.dragging.enable();
});
It seems like when I search around, I find info on how to disable dragging entirely, or disable anytime on mobile -- I don't want to do that.
I have the functionality working well when it is linked to a mouseover event (example above) -- I just need to know how to do the same exact thing, but when an opacity/transparency slider is being engaged with on any kind of touch screen. This map is being designed for large, touchscreen digital signage.
Thank you for reading!
leaflet
New contributor
add a comment |
I am wondering if anyone knows how to replicate this, but specifically with touchscreens in mind:
//disable dragging when cursor is over the element
opacitySlider.getContainer().addEventListener('mouseover', function () {
map.dragging.disable();
});
// Re-enable dragging when user's cursor leaves the element
opacitySlider.getContainer().addEventListener('mouseout', function () {
map.dragging.enable();
});
It seems like when I search around, I find info on how to disable dragging entirely, or disable anytime on mobile -- I don't want to do that.
I have the functionality working well when it is linked to a mouseover event (example above) -- I just need to know how to do the same exact thing, but when an opacity/transparency slider is being engaged with on any kind of touch screen. This map is being designed for large, touchscreen digital signage.
Thank you for reading!
leaflet
New contributor
I am wondering if anyone knows how to replicate this, but specifically with touchscreens in mind:
//disable dragging when cursor is over the element
opacitySlider.getContainer().addEventListener('mouseover', function () {
map.dragging.disable();
});
// Re-enable dragging when user's cursor leaves the element
opacitySlider.getContainer().addEventListener('mouseout', function () {
map.dragging.enable();
});
It seems like when I search around, I find info on how to disable dragging entirely, or disable anytime on mobile -- I don't want to do that.
I have the functionality working well when it is linked to a mouseover event (example above) -- I just need to know how to do the same exact thing, but when an opacity/transparency slider is being engaged with on any kind of touch screen. This map is being designed for large, touchscreen digital signage.
Thank you for reading!
leaflet
leaflet
New contributor
New contributor
New contributor
asked 7 mins ago
BelleBelle
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Belle is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313153%2fdisable-map-dragging-only-when-touch-sliding-transparency-slider%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Belle is a new contributor. Be nice, and check out our Code of Conduct.
Belle is a new contributor. Be nice, and check out our Code of Conduct.
Belle is a new contributor. Be nice, and check out our Code of Conduct.
Belle is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313153%2fdisable-map-dragging-only-when-touch-sliding-transparency-slider%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown