File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/landing/install/js/landing/node/map.min.js
Back
(function(){"use strict";BX.namespace("BX.Landing");var t=BX.Landing.Utils.debounce;var e=BX.Landing.Utils.data;var a=BX.Landing.Utils.proxy;var n=BX.Landing.Utils.onCustomEvent;var i=BX.Landing.Utils.encodeDataValue;BX.Landing.Block.Node.Map=function(t){BX.Landing.Block.Node.apply(this,arguments);this.type="map";this.attribute="data-map";this.hidden=true;this.createMap();this.lastValue=this.getValue();n("BX.Landing.Block:updateStyleWithoutDebounce",this.onBlockUpdateStyles.bind(this));n("BX.Landing.Block:Node:updateAttr",this.onBlockUpdateAttrs.bind(this))};BX.Landing.Block.Node.Map.prototype={constructor:BX.Landing.Block.Node.Map,__proto__:BX.Landing.Block.Node.prototype,createMap:function(){var n={mapContainer:this.node,mapOptions:e(this.node,"data-map"),theme:e(this.node,"data-map-theme"),roads:e(this.node,"data-map-roads")||[],landmarks:e(this.node,"data-map-landmarks")||[],labels:e(this.node,"data-map-labels")||[],onMapClick:a(this.onMapClick,this),onChange:t(this.onChange,500,this),fullscreenControl:false,mapTypeControl:false,zoomControl:false};this.map=BX.Landing.Provider.Map.create(this.node,n)},onBlockUpdateAttrs:function(t){if(t.node===this.node){this.createMap();this.lastValue=this.getValue()}},onBlockUpdateStyles:function(t){if(t.block.contains(this.node)){this.createMap();this.lastValue=this.getValue()}},onMapClick:function(t){if(BX.Landing.UI.Panel.StylePanel.getInstance().isShown()){return}this.map.addMarker({latLng:this.map.getPointByEvent(t),title:"",description:"",showByDefault:false,draggable:true,editable:true});this.map.onMarkerClick(this.map.markers[this.map.markers.length-1])},onChange:function(t){if(this.isChanged()){if(!t){BX.Landing.History.getInstance().push(new BX.Landing.History.Entry({block:this.getBlock().id,selector:this.selector,command:"editEmbed",undo:this.lastValue,redo:this.getValue()}))}this.lastValue=this.getValue();this.onChangeHandler(this)}},isChanged:function(){return JSON.stringify(this.getValue())!==JSON.stringify(this.lastValue)},getValue:function(){return this.map.getValue()},getAttrValue:function(){return i(this.getValue())},setValue:function(t,e,a){this.map.setValue(t,a)},getField:function(){return new BX.Landing.UI.Field.BaseField({selector:this.selector,hidden:true})}}})(); //# sourceMappingURL=map.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings