How to use the @supermap/iclient-common.CommonUtil.modifyDOMElement function in @supermap/iclient-common

To help you get started, we’ve selected a few @supermap/iclient-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SuperMap / iClient-JavaScript / src / openlayers / overlay / HeatMap.js View on Github external
setOpacity(opacity) {
        if (opacity !== this.opacity) {
            this.opacity = opacity;
            var element = this.rootCanvas;
            CommonUtil.modifyDOMElement(element, null, null, null,
                null, null, null, opacity);

            if (this.map !== null) {
                // this.dispatchEvent({type: 'changelayer', value: {layer: this, property: "opacity"}});
                this.changed();
            }
        }
    }
github SuperMap / iClient-JavaScript / src / mapboxgl / overlay / theme / ThemeLayer.js View on Github external
setOpacity(opacity) {
        if (opacity !== this.opacity) {
            this.opacity = opacity;
            var element = this.div;
            CommonUtil.modifyDOMElement(element, null, null, null,
                null, null, null, opacity);

            if (this.map !== null) {
                 /**
                 * @event mapboxgl.supermap.ThemeLayer#changelayer
                 * @description 图层属性改变之后触发。
                 * @property {Object} layer - 图层。
                 * @property {string} property - 被改变的属性。
                 */
                mapboxgl.Evented.prototype.fire('changelayer', {layer: this, property: "opacity"});
            }
        }
    }
github SuperMap / iClient-JavaScript / src / openlayers / overlay / theme / Theme.js View on Github external
setOpacity(opacity) {
        if (opacity !== this.opacity) {
            this.opacity = opacity;
            var element = this.div;
            CommonUtil.modifyDOMElement(element, null, null, null,
                null, null, null, opacity);

            if (this.map !== null) {
                this.dispatchEvent({type: 'changelayer', value: {layer: this, property: "opacity"}});
            }
        }
    }
github SuperMap / iClient-JavaScript / src / openlayers / overlay / HeatMap.js View on Github external
this.opacity = options.opacity ? options.opacity : 1;
        this.colors = options.colors ? options.colors : ['blue', 'cyan', 'lime', 'yellow', 'red'];
        this.useGeoUnit = options.useGeoUnit ? options.useGeoUnit : false;
        this.radius = options.radius ? options.radius : 50;
        this.featureWeight = options.featureWeight ? options.featureWeight : null;
        this.maxWeight = null;
        this.minWeight = null;
        this.maxWidth = null;
        this.maxHeight = null;

        //创建热力图绘制面板
        this.rootCanvas = document.createElement("canvas");
        var mapSize = this.map.getSize();
        this.rootCanvas.width = this.maxWidth = parseInt(mapSize[0]);
        this.rootCanvas.height = this.maxHeight = parseInt(mapSize[1]);
        CommonUtil.modifyDOMElement(this.rootCanvas, null, null, null,
            null, null, null, this.opacity);
        this.canvasContext = this.rootCanvas.getContext('2d');
    }
github SuperMap / iClient-JavaScript / src / mapboxgl / overlay / HeatMapLayer.js View on Github external
_createCanvasContainer() {
        this.supported = true;
        //构建绘图面板
        this.mapContainer = this.map.getCanvasContainer();
        //热点图要求使用canvas绘制,判断是否支持
        this.rootCanvas = document.createElement("canvas");
        this.rootCanvas.id = this.id;
        var mapCanvas = this.map.getCanvas();
        this.rootCanvas.width = this.maxWidth = parseInt(mapCanvas.width);
        this.rootCanvas.height = this.maxHeight = parseInt(mapCanvas.height);
        CommonUtil.modifyDOMElement(this.rootCanvas, null, null, null,
            "absolute", null, null, this.opacity);
        this.canvasContext = this.rootCanvas.getContext('2d');
        this.mapContainer.appendChild(this.rootCanvas);
    }
github SuperMap / iClient-JavaScript / src / leaflet / overlay / theme / ThemeLayer.js View on Github external
_updateOpacity: function () {
        var me = this;
        CommonUtil.modifyDOMElement(me.container, null, null, null, null, null, null, me.options.opacity);
        if (me._map !== null) {
            /**
             * @event L.supermap.ThemeLayer#changelayer
             * @description 图层属性改变之后触发。
             * @property {Object} layer - 图层。
             * @property {string} property - 图层属性。
             */
            me._map.fire("changelayer", {
                layer: me,
                property: "opacity"
            });
        }
    },
github SuperMap / iClient-JavaScript / src / mapboxgl / overlay / HeatMapLayer.js View on Github external
setOpacity(opacity) {
        if (opacity !== this.opacity) {
            this.opacity = opacity;
            CommonUtil.modifyDOMElement(this.rootCanvas, null, null, null,
                null, null, null, opacity);

            if (this.map !== null) {
                /**
                 * @event mapboxgl.supermap.HeatMapLayer#changelayer
                 * @description 图层属性改变之后触发。
                 * @property {Object} layer - 图层。
                 * @property {string} property - 被改变的图层属性。
                 */
                this.fire('changelayer', {layer: this, property: "opacity"});
            }
        }
    }