diff --git a/cypress/integration/rotation.spec.js b/cypress/integration/rotation.spec.js index 54f1a898..a9341465 100644 --- a/cypress/integration/rotation.spec.js +++ b/cypress/integration/rotation.spec.js @@ -37,6 +37,7 @@ describe('Rotation', () => { cy.window().then(({ map }) => { const layer = map.pm.getGeomanDrawLayers()[0]; + expect(layer.pm.rotateEnabled()).to.equal(false); layer.pm.enableRotate(); expect(layer.pm.rotateEnabled()).to.equal(true); diff --git a/src/js/Mixins/Rotating.js b/src/js/Mixins/Rotating.js index 32e087ec..4076a18b 100644 --- a/src/js/Mixins/Rotating.js +++ b/src/js/Mixins/Rotating.js @@ -222,7 +222,7 @@ const RotateMixin = { } }, rotateEnabled() { - return this._rotateEnabled; + return !!this._rotateEnabled; }, // angle is clockwise (0-360) rotateLayer(degrees) {