MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / resize

Method resize

src/common/overlay/levelRenderer/Painter.js:548–574  ·  view source on GitHub ↗

* @function LevelRenderer.Painter.prototype.resize * @description 区域大小变化后重绘。 * @return {LevelRenderer.Painter} this。

()

Source from the content-addressed store, hash-verified

546 * @return {LevelRenderer.Painter} this。
547 */
548 resize() {
549 var domRoot = this._domRoot;
550 domRoot.style.display = 'none';
551
552 var width = this._getWidth();
553 var height = this._getHeight();
554
555 domRoot.style.display = '';
556
557 // 优化没有实际改变的resize
558 if (this._width != width || height != this._height) {
559 this._width = width;
560 this._height = height;
561
562 domRoot.style.width = width + 'px';
563 domRoot.style.height = height + 'px';
564
565 for (var id in this._layers) {
566
567 this._layers[id].resize(width, height);
568 }
569
570 this.refresh(null, true);
571 }
572
573 return this;
574 }
575
576
577 /**

Callers

nothing calls this directly

Calls 3

_getWidthMethod · 0.95
_getHeightMethod · 0.95
refreshMethod · 0.95

Tested by

no test coverage detected