_defineProperty()

in public/assets/maplibre/maplibre-gl-framerate.js [70:104]


        _defineProperty(this, "onAdd", function (map) {
            _this.map = map;
            var dpr = window.devicePixelRatio;
            var _this$options = _this.options,
                width = _this$options.width,
                graphWidth = _this$options.graphWidth,
                graphHeight = _this$options.graphHeight,
                color = _this$options.color,
                background = _this$options.background,
                font = _this$options.font;
            var el = _this.container = document.createElement('div');
            el.className = 'maplibregl-ctrl maplibregl-ctrl-fps';
            el.style.backgroundColor = background;
            el.style.borderRadius = '6px';
            _this.readOutput = document.createElement('div');
            _this.readOutput.style.color = color;
            _this.readOutput.style.fontFamily = font;
            _this.readOutput.style.padding = '0 5px 5px';
            _this.readOutput.style.fontSize = '9px';
            _this.readOutput.style.fontWeight = 'bold';
            _this.readOutput.textContent = 'Waiting…';
            _this.canvas = document.createElement('canvas');
            _this.canvas.className = 'maplibregl-ctrl-canvas';
            _this.canvas.width = width;
            _this.canvas.height = graphHeight;
            _this.canvas.style.cssText = "width: ".concat(width / dpr, "px; height: ").concat(graphHeight / dpr, "px;");
            el.appendChild(_this.readOutput);
            el.appendChild(_this.canvas);

            _this.map.on('movestart', _this.onMoveStart);

            _this.map.on('moveend', _this.onMoveEnd);

            return _this.container;
        });