We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0c435c commit 3d4d785Copy full SHA for 3d4d785
src/openlayers/control/ScaleLine.js
@@ -28,16 +28,17 @@ export class ScaleLine extends ol.control.ScaleLine {
28
29
constructor(options) {
30
options = options || {};
31
+ //需在super之前定义render,真正的调用是在初始化完成后
32
options.render = function (mapEvent) {
33
var frameState = mapEvent.frameState;
34
if (!frameState) {
- this.viewState_ = null;
35
+ this.viewState_ = null; //NOSONAR
36
} else {
- this.viewState_ = frameState.viewState;
37
+ this.viewState_ = frameState.viewState; //NOSONAR
38
}
- this.updateElementRepair();
39
+ this.updateElementRepair(); //NOSONAR
40
- super(options)
41
+ super(options);
42
43
44
updateElementRepair() {
0 commit comments