久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <bdo id='9G2IS'></bdo><ul id='9G2IS'></ul>
    <tfoot id='9G2IS'></tfoot>
    <legend id='9G2IS'><style id='9G2IS'><dir id='9G2IS'><q id='9G2IS'></q></dir></style></legend>
  1. <i id='9G2IS'><tr id='9G2IS'><dt id='9G2IS'><q id='9G2IS'><span id='9G2IS'><b id='9G2IS'><form id='9G2IS'><ins id='9G2IS'></ins><ul id='9G2IS'></ul><sub id='9G2IS'></sub></form><legend id='9G2IS'></legend><bdo id='9G2IS'><pre id='9G2IS'><center id='9G2IS'></center></pre></bdo></b><th id='9G2IS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9G2IS'><tfoot id='9G2IS'></tfoot><dl id='9G2IS'><fieldset id='9G2IS'></fieldset></dl></div>

      <small id='9G2IS'></small><noframes id='9G2IS'>

    1. 為什么調用傳單的 setZoom 兩次導致第二次被忽略

      Why does calling leaflet#39;s setZoom twice results on the second being ignored?(為什么調用傳單的 setZoom 兩次導致第二次被忽略?)
      <tfoot id='FIPEA'></tfoot>

        <bdo id='FIPEA'></bdo><ul id='FIPEA'></ul>

          <small id='FIPEA'></small><noframes id='FIPEA'>

              <legend id='FIPEA'><style id='FIPEA'><dir id='FIPEA'><q id='FIPEA'></q></dir></style></legend>

                  <tbody id='FIPEA'></tbody>

                <i id='FIPEA'><tr id='FIPEA'><dt id='FIPEA'><q id='FIPEA'><span id='FIPEA'><b id='FIPEA'><form id='FIPEA'><ins id='FIPEA'></ins><ul id='FIPEA'></ul><sub id='FIPEA'></sub></form><legend id='FIPEA'></legend><bdo id='FIPEA'><pre id='FIPEA'><center id='FIPEA'></center></pre></bdo></b><th id='FIPEA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FIPEA'><tfoot id='FIPEA'></tfoot><dl id='FIPEA'><fieldset id='FIPEA'></fieldset></dl></div>
                本文介紹了為什么調用傳單的 setZoom 兩次導致第二次被忽略?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                要重現此問題,您可以轉到 http://leafletjs.com/ 并在 javascript 控制臺中,寫下:

                To reproduce this problem, you can go to http://leafletjs.com/ and in the javascript console, write the following:

                > map.getZoom()
                15
                > map.setZoom(10);map.setZoom(1);
                Object
                > map.getZoom()
                10
                

                我期待最終的 getZoom 返回 1.為什么會這樣?該問題可能與縮放動畫有關.如果在動畫結束之前調用了 setZoom,它將被忽略.

                I was expecting the final getZoom to return 1. Why does this happen? The problem may be related with the zoom animation. If a setZoom is called before the animation ends, it gets ignored.

                我正在將傳單與 emberjs 集成,并希望允許通過外部更改進行縮放更改.如果用戶快速更改縮放,則效果不理想.

                I'm integrating leaflet with emberjs and wanted to allow zoom changes by external changes. If the user changes zoom quickly, the effect isn't the desired.

                推薦答案

                <代碼>L.Map.setZoom 稱為 L.Map.setView 調用 L.Map._animateZoomIfClose.如果 map._animatingZoom 為真,那么任何縮放都將停止.map._animatingZoom 像尋找縮放動畫一樣工作:

                L.Map.setZoom called L.Map.setView that called L.Map._animateZoomIfClose. If map._animatingZoom is true then any zoom will stop. map._animatingZoom work like look for zoom animation:

                1. 查看 L.Map._animateZoomIfClose 如果 true 停止縮放,否則調用 L.Map._animateZoom.
                2. 在 處設置為 trueL.Map._animateZoom 并開始 css 過渡.
                3. 在 處設置為 falseL.Map._onZoomTransitionEnd 在 css 過渡結束時.
                1. Check at L.Map._animateZoomIfClose if true stop zoom else call L.Map._animateZoom.
                2. Set to true at L.Map._animateZoom and start css transition.
                3. Set to false at L.Map._onZoomTransitionEnd on css transition end.

                為什么是這樣?我認為是因為很難打破 css 過渡工作.

                Why it's as is? I think because it's difficult break css transition work.

                因此,如果您要禁用任何 css 轉換和轉換,您的代碼必須能夠正常工作.您還可以添加自己的擴展:如果 map._animatingZoom === true 然后將您的操作放入數組,當 map._catchTransitionEnd 調用時處理此操作并將您的操作從數組和進程:

                So if you will disable any css transform and transition your code must work right. You also can add own extension: if map._animatingZoom === true then put your action to array, when map._catchTransitionEnd called process this and shift your action from array and process:

                if (L.DomUtil.TRANSITION) {
                    L.Map.addInitHook(function () {
                        L.DomEvent.on(this._mapPane, L.DomUtil.TRANSITION_END, function () {
                            var zoom = this._zoomActions.shift();
                            if (zoom !== undefined) {
                                this.setZoom(zoom);
                            }
                        }, this);
                    });
                }
                
                L.Map.include(!L.DomUtil.TRANSITION ? {} : {
                    _zoomActions: [],
                    queueZoom: function (zoom) {
                        if (map._animatingZoom) {
                            this._zoomActions.push(zoom);
                        } else {
                            this.setZoom(zoom);
                        }
                    }
                });
                

                這篇關于為什么調用傳單的 setZoom 兩次導致第二次被忽略?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Check if a polygon point is inside another in leaflet(檢查一個多邊形點是否在傳單中的另一個內部)
                Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標記群集圖標顏色,繼承其余默認 CSS 屬性)
                Trigger click on leaflet marker(觸發點擊傳單標記)
                How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認加載磁貼顏色?)
                Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)
                1. <small id='zloij'></small><noframes id='zloij'>

                    <legend id='zloij'><style id='zloij'><dir id='zloij'><q id='zloij'></q></dir></style></legend>

                      • <bdo id='zloij'></bdo><ul id='zloij'></ul>
                      • <i id='zloij'><tr id='zloij'><dt id='zloij'><q id='zloij'><span id='zloij'><b id='zloij'><form id='zloij'><ins id='zloij'></ins><ul id='zloij'></ul><sub id='zloij'></sub></form><legend id='zloij'></legend><bdo id='zloij'><pre id='zloij'><center id='zloij'></center></pre></bdo></b><th id='zloij'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zloij'><tfoot id='zloij'></tfoot><dl id='zloij'><fieldset id='zloij'></fieldset></dl></div>
                        <tfoot id='zloij'></tfoot>
                          <tbody id='zloij'></tbody>

                          主站蜘蛛池模板: 特黄毛片视频 | 插插宗合网| 高清国产一区二区 | 在线观看国产wwwa级羞羞视频 | 亚洲欧美国产毛片在线 | 亚洲精品在线看 | 九九久久国产 | 69亚洲精品| 欧美国产日韩在线 | 成人性生交大片 | 天堂成人国产精品一区 | 中文字幕日本一区二区 | 性做久久久久久免费观看欧美 | 97视频免费 | 日韩激情视频一区 | 亚洲天堂成人在线视频 | 青青草视频网 | 在线看片网站 | www.国产91 | 日韩午夜在线观看 | 国产日韩欧美一区二区在线播放 | 精品www| 精品一区二区三区在线播放 | 欧美精品99 | 久久久爽爽爽美女图片 | 久久一区二区三区电影 | 色综合一区二区 | 免费在线观看一区二区 | 日韩亚洲欧美综合 | 岛国av在线免费观看 | 黑人性hd| 国产精品色婷婷久久58 | 亚洲 中文 欧美 日韩 在线观看 | 91精品国产色综合久久不卡蜜臀 | 日本精品视频 | 在线观看免费国产 | 国产精品久久久久久久久久久久久 | 一区二区三区电影在线观看 | 亚洲免费久久久 | 午夜国产精品视频 | 亚洲国产精品成人 |