Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 8ae48b59 authored by Robin Tissot's avatar Robin Tissot
Browse files

Merge branch 'develop'

parents 9765b586 76c8fb17
No related branches found
No related tags found
1 merge request!52Api model
...@@ -5,8 +5,10 @@ const BasePanel = Vue.extend({ ...@@ -5,8 +5,10 @@ const BasePanel = Vue.extend({
ratio: 1 ratio: 1
}; };
}, },
updated() { watch: {
if (this.part.loaded) this.refresh(); 'ratio': function(n, o) {
if (this.part.loaded) this.refresh();
}
}, },
methods: { methods: {
setRatio() { setRatio() {
......
...@@ -116,6 +116,7 @@ const SegPanel = BasePanel.extend({ ...@@ -116,6 +116,7 @@ const SegPanel = BasePanel.extend({
}, },
imageSrc() { imageSrc() {
// empty the src to make sure the complete event gets fired // empty the src to make sure the complete event gets fired
// this.$img.src = '';
if (!this.part.loaded) return ''; if (!this.part.loaded) return '';
// overrides imageSrc to deal with color modes // overrides imageSrc to deal with color modes
// Note: vue.js doesn't have super call wtf we need to copy the code :( // Note: vue.js doesn't have super call wtf we need to copy the code :(
...@@ -144,6 +145,12 @@ const SegPanel = BasePanel.extend({ ...@@ -144,6 +145,12 @@ const SegPanel = BasePanel.extend({
this.refreshHistoryBtns(); this.refreshHistoryBtns();
} }
}, },
'colorMode': function(n, o) {
this.$parent.prefetchImage(this.imageSrc, function(src) {
this.$img.src = src;
this.refreshSegmenter();
}.bind(this));
},
'fullsizeimage': function(n, o) { 'fullsizeimage': function(n, o) {
// it was prefetched // it was prefetched
if (n && n != o) { if (n && n != o) {
...@@ -194,7 +201,6 @@ const SegPanel = BasePanel.extend({ ...@@ -194,7 +201,6 @@ const SegPanel = BasePanel.extend({
updateView() { updateView() {
this.segmenter.refresh(); this.segmenter.refresh();
}, },
// undo manager helpers // undo manager helpers
bulkCreate(data, createInEditor=false) { bulkCreate(data, createInEditor=false) {
if (data.regions && data.regions.length) { if (data.regions && data.regions.length) {
......
...@@ -14,6 +14,7 @@ const VisuPanel = BasePanel.extend({ ...@@ -14,6 +14,7 @@ const VisuPanel = BasePanel.extend({
Vue.nextTick(function() { Vue.nextTick(function() {
this.$parent.zoom.register(this.$el.querySelector('#visu-zoom-container'), this.$parent.zoom.register(this.$el.querySelector('#visu-zoom-container'),
{map: true}); {map: true});
this.refresh();
}.bind(this)); }.bind(this));
}, },
methods: { methods: {
......
...@@ -190,6 +190,7 @@ var partVM = new Vue({ ...@@ -190,6 +190,7 @@ var partVM = new Vue({
let img = new Image(); let img = new Image();
img.addEventListener('load', function() { img.addEventListener('load', function() {
if (callback) callback(src); if (callback) callback(src);
img.remove();
}.bind(this)); }.bind(this));
img.src = src; img.src = src;
}, },
......
...@@ -316,7 +316,7 @@ ...@@ -316,7 +316,7 @@
v-bind:key="'sL' + line.pk"/> v-bind:key="'sL' + line.pk"/>
</div> </div>
<img class="panel-img" v-bind:src="imageSrc"/> <img class="panel-img"/>
{# TODO: make line overlay component #} {# TODO: make line overlay component #}
<div id="segmentation-overlay" class="overlay panel-overlay"> <div id="segmentation-overlay" class="overlay panel-overlay">
<svg width="100%" height="100%"> <svg width="100%" height="100%">
......
...@@ -12,7 +12,7 @@ django-redis==4.10.0 ...@@ -12,7 +12,7 @@ django-redis==4.10.0
psycopg2-binary==2.7.6 psycopg2-binary==2.7.6
django-ordered-model==3.1.1 django-ordered-model==3.1.1
easy-thumbnails==2.5 easy-thumbnails==2.5
git+https://github.com/mittagessen/kraken.git@3.0b14#egg=kraken git+https://github.com/mittagessen/kraken.git@3.0b15#egg=kraken
django-cleanup==3.0.1 django-cleanup==3.0.1
djangorestframework==3.9.2 djangorestframework==3.9.2
drf-nested-routers==0.91 drf-nested-routers==0.91
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment