דיון זה מוגדר: סגור
תגיות: מפות
מוצגות 4 תגובות – 1 עד 4 (מתוך 4 סה״כ)
-
מאתתגובות
-
10/03/2015 בשעה 14:17 #18389
omerlevi
Participantהי,
הטמעתי מפה אך ברצוני שהמפה תישאר סטטית בעת גלילה עם העכבר.
האם יש אפשרות לעשות זאת?
10/03/2015 בשעה 14:22 #18391omerlevi
Participantבגדול עושים את זה עם scrollwheel: false בקריאה ל- api של גוגל מפות… השאלה שלי היא האם יש דרך לעשות זאת ספציפית למפה מסויימת באתר ולא לכל המפות, ואיך אפשר להטמיע את השינוי בקוד כחלק מערכת בת ולא ע״י שינויים של הת׳ים הראשי.
תודה 🙂
10/03/2015 בשעה 15:44 #18398Yakir Sitbon
Participantהיי עומר, מה שאנחנו מטמיעים בתבנית, זה על ידי iframe שלהם. האם ידוע לך מה הפרמטר שמגיע דרך ה-URL?
10/03/2015 בשעה 18:50 #18411omerlevi
Participantיש שם פיתרון חמוד.
אז הוספתי את ה- js הזה:
jQuery(document).ready(function () { // you want to enable the pointer events only on click; jQuery('.pojo-google-map-wrap iframe').addClass('scrolloff'); // set the pointer events to none on doc ready jQuery('.pojo-google-map-wrap').on('click', function () { $('.pojo-google-map-wrap iframe').removeClass('scrolloff'); // set the pointer events true on click }); // you want to disable pointer events when the mouse leave the canvas area; jQuery(".pojo-google-map-wrap iframe").mouseleave(function () { jQuery('.pojo-google-map-wrap iframe').addClass('scrolloff'); // set the pointer events to none when mouse leaves the map area }); });ואת ה- css הבא:
.scrolloff { pointer-events: none; }מה שנתן לי פיתרון סביר.
-
מאתתגובות
מוצגות 4 תגובות – 1 עד 4 (מתוך 4 סה״כ)
- הפורום 'תמיכה' נסגר לדיונים ולתגובות חדשות.
