ol 7.1.1-dev.1669138178783 → 7.1.1-dev.1669389891499
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/format/KML.js +3 -1
- package/package.json +1 -1
- package/render/canvas/Immediate.d.ts +5 -0
- package/render/canvas/Immediate.d.ts.map +1 -1
- package/render/canvas/Immediate.js +15 -0
- package/util.js +1 -1
package/format/KML.js
CHANGED
|
@@ -1869,7 +1869,9 @@ function readStyle(node, objectStack) {
|
|
|
1869
1869
|
let imageStyle;
|
|
1870
1870
|
if ('imageStyle' in styleObject) {
|
|
1871
1871
|
if (styleObject['imageStyle'] != DEFAULT_NO_IMAGE_STYLE) {
|
|
1872
|
-
imageStyle =
|
|
1872
|
+
imageStyle = /** @type {import("../style/Image.js").default} */ (
|
|
1873
|
+
styleObject['imageStyle']
|
|
1874
|
+
);
|
|
1873
1875
|
}
|
|
1874
1876
|
} else {
|
|
1875
1877
|
imageStyle = DEFAULT_IMAGE_STYLE;
|
package/package.json
CHANGED
|
@@ -39,6 +39,11 @@ declare class CanvasImmediateRenderer extends VectorContext {
|
|
|
39
39
|
* @type {import("../../transform.js").Transform}
|
|
40
40
|
*/
|
|
41
41
|
private transform_;
|
|
42
|
+
/**
|
|
43
|
+
* @private
|
|
44
|
+
* @type {number}
|
|
45
|
+
*/
|
|
46
|
+
private transformRotation_;
|
|
42
47
|
/**
|
|
43
48
|
* @private
|
|
44
49
|
* @type {number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Immediate.d.ts","sourceRoot":"","sources":["Immediate.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Immediate.d.ts","sourceRoot":"","sources":["Immediate.js"],"names":[],"mappings":";AAgCA;;;;;;;;GAQG;AACH;IACE;;;;;;;;OAQG;IACH,qBARW,wBAAwB,cACxB,MAAM,UACN,OAAO,iBAAiB,EAAE,MAAM,aAChC,OAAO,oBAAoB,EAAE,SAAS,gBACtC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BAAoB,EAAE,SAAS,QAIhD;IAED;;;;;;OAMG;IACH,uBAHW,OAAO,wBAAwB,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAoDlF;IAqBD;;;;;OAKG;IACH,iCAFW,OAAO,kCAAkC,EAAE,OAAO,QAO5D;IAED;;;;;OAKG;IACH,oBAFW,OAAO,qBAAqB,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAmB/E;IAED;;;;;OAKG;IACH,yBAFW,OAAO,0BAA0B,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAmBpF;IAED;;;;;OAKG;IACH,yBAFW,OAAO,0BAA0B,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAgCpF;IAED;;;;;OAKG;IACH,8BAFW,OAAO,+BAA+B,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAuCzF;IAED;;;;;OAKG;IACH,sBAFW,OAAO,uBAAuB,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAwCjF;IAED;;;;OAIG;IACH,2BAFW,OAAO,4BAA4B,EAAE,OAAO,QA0CtD;IAED;;;OAGG;IACH,6BAcC;IAED;;;OAGG;IACH,+BAmDC;IAED;;;OAGG;IACH,6BA6BC;IAiED;;;;;OAKG;IACH,0BAFW,OAAO,sBAAsB,EAAE,OAAO,QA0BhD;IAED;;;;;OAKG;IACH,wBAFW,OAAO,qBAAqB,EAAE,OAAO,QA6F/C;CACF"}
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
} from '../canvas.js';
|
|
27
27
|
import {equals} from '../../array.js';
|
|
28
28
|
import {intersects} from '../../extent.js';
|
|
29
|
+
import {toFixed} from '../../math.js';
|
|
29
30
|
import {transform2D} from '../../geom/flat/transform.js';
|
|
30
31
|
import {transformGeom2D} from '../../geom/SimpleGeometry.js';
|
|
31
32
|
|
|
@@ -83,6 +84,14 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
83
84
|
*/
|
|
84
85
|
this.transform_ = transform;
|
|
85
86
|
|
|
87
|
+
/**
|
|
88
|
+
* @private
|
|
89
|
+
* @type {number}
|
|
90
|
+
*/
|
|
91
|
+
this.transformRotation_ = transform
|
|
92
|
+
? toFixed(Math.atan2(transform[1], transform[0]), 10)
|
|
93
|
+
: 0;
|
|
94
|
+
|
|
86
95
|
/**
|
|
87
96
|
* @private
|
|
88
97
|
* @type {number}
|
|
@@ -290,6 +299,9 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
290
299
|
context.globalAlpha = alpha * this.imageOpacity_;
|
|
291
300
|
}
|
|
292
301
|
let rotation = this.imageRotation_;
|
|
302
|
+
if (this.transformRotation_ === 0) {
|
|
303
|
+
rotation -= this.viewRotation_;
|
|
304
|
+
}
|
|
293
305
|
if (this.imageRotateWithView_) {
|
|
294
306
|
rotation += this.viewRotation_;
|
|
295
307
|
}
|
|
@@ -375,6 +387,9 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
375
387
|
);
|
|
376
388
|
const context = this.context_;
|
|
377
389
|
let rotation = this.textRotation_;
|
|
390
|
+
if (this.transformRotation_ === 0) {
|
|
391
|
+
rotation -= this.viewRotation_;
|
|
392
|
+
}
|
|
378
393
|
if (this.textRotateWithView_) {
|
|
379
394
|
rotation += this.viewRotation_;
|
|
380
395
|
}
|
package/util.js
CHANGED