Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Commit

Permalink
fix: do not make marker dragable if map disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Oct 14, 2019
1 parent d840cba commit 698a1d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/js/all.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/css/app.css": "/css/app.css?id=9ccf21a457016100da27",
"/js/all.js": "/js/all.js?id=76fac692bbf5574304b9",
"/js/all.js": "/js/all.js?id=b5258adb154d8a6b81e5",
"/css/all.css": "/css/all.css?id=7b2e7f4696f2d3bf19b0",
"/semantic/semantic.min.css": "/semantic/semantic.min.css?id=395cd6af3c3778570b67"
}
6 changes: 4 additions & 2 deletions resources/js/init/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ $(function () {
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
if ($(this).is('[disabled]')) {
var disabled = $(this).is('[disabled]');

if (disabled) {
$.extend(options, {
gestureHandling: 'none',
zoomControl: false
Expand All @@ -260,7 +262,7 @@ $(function () {
var marker = new google.maps.Marker({
position: center,
map: map,
draggable: true
draggable: !disabled
});
google.maps.event.addListener(
marker,
Expand Down

0 comments on commit 698a1d1

Please sign in to comment.