Skip to content

Commit 617469b

Browse files
committed
Adapt the scale method (reset scale to 1 after each change).
1 parent baf6cce commit 617469b

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

src/public/assets/scripts/annotations.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/public/assets/scripts/volumes.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/public/mix-manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"/assets/scripts/main.js": "/assets/scripts/main.js?id=5d75e90309015b8aad9b612f52a6979f",
3-
"/assets/scripts/volumes.js": "/assets/scripts/volumes.js?id=ead6c2afb75060312c61a6d68ad4b28d",
4-
"/assets/scripts/annotations.js": "/assets/scripts/annotations.js?id=4c1eb02d73360d78996dd306466b2d38",
5-
"/assets/styles/main.css": "/assets/styles/main.css?id=bf09d95dc04208c3ee738dafbf8e123c"
6-
}
3+
"/assets/scripts/volumes.js": "/assets/scripts/volumes.js?id=f487d8fe79d9ae5c2eb5c53edc02c374",
4+
"/assets/scripts/annotations.js": "/assets/scripts/annotations.js?id=305559ed397c61a8e6f2a2e1bbba4fea",
5+
"/assets/styles/main.css": "/assets/styles/main.css?id=b692ef8518741236ded072068dddeb05"
6+
}

src/resources/assets/js/annotations/components/settingsTabPlugin.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ export default {
102102
} else {
103103
// call method to update layer scale
104104
this.handleRenderEvents(this.layer, this.scale, null);
105+
// reset scale to 1.0 after it has been modified
106+
this.scale = 1.0;
105107
this.map.getInteractions().forEach((interaction) => {
106108
if (interaction.get('name') === 'mousewheelzoom') {
107109
interaction.setActive(true);
@@ -162,7 +164,6 @@ export default {
162164
}
163165
if(scale !== null) {
164166
ctx.scale(scale, scale, canvasPixel);
165-
this.$nextTick();
166167
}
167168
ctx.translate(-canvasPixel[0], -canvasPixel[1]);
168169
});
@@ -298,12 +299,14 @@ export default {
298299
// // mapLayer.changed();
299300
// // mapLayer.getSource().refresh();
300301
// // });
301-
// layer.setOpacity(this.opacity);
302-
// layer.setVisible(true);
302+
// mapLayer.setOpacity(this.opacity);
303+
// mapLayer.setVisible(true);
303304
// }
304305
// }
305306
// });
306-
// // if layer does not exist yet, add it to map
307+
308+
// this.map.renderSync();
309+
// if layer does not exist yet, add it to map
307310
// if(!layerExists) {
308311
this.map.getLayers().removeAt(0);
309312
this.map.getLayers().insertAt(0, this.layer);

src/resources/views/annotationsSettingsTab.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
</div>
1818
</collapse>
1919
<button class="btn btn-default" title="Edit the scale of the context layer" v-on:click="toggleEditing" :class="{active:isEditing}"><span class="fa fa-pencil-alt" aria-hidden="true"></span> Edit</button>
20-
<span>Scale </span>(<span v-text="scale"></span>)
20+
<span v-if="scale !== 1.0"> <span>Scale </span>(<span v-text="scale"></span>)</span>
2121
</div>
2222
</component>

0 commit comments

Comments
 (0)