avoid some icon rotation changes

This commit is contained in:
Matthias Wirth
2020-10-23 11:01:20 +02:00
parent 8e5250a0af
commit ade97cffc3

View File

@@ -821,9 +821,10 @@ PlaneObject.prototype.updateIcon = function() {
}
*/
if (this.rotationCache == null || Math.abs(this.rotationCache - this.rotation) > 0.15) {
this.rotationCache = this.rotation;
this.markerIcon.setRotation(this.baseMarker.noRotate ? 0 : this.rotation * Math.PI / 180.0);
const iconRotation = this.baseMarker.noRotate ? 0 : this.rotation;
if (this.rotationCache != iconRotation && Math.abs(this.rotationCache - iconRotation) > 0.35) {
this.rotationCache = iconRotation;
this.markerIcon.setRotation(iconRotation * Math.PI / 180.0);
}
if (this.scaleCache != this.scale) {