diff --git a/django/applications/catmaid/control/data_view.py b/django/applications/catmaid/control/data_view.py index eee6972ef8..2f03d405d6 100644 --- a/django/applications/catmaid/control/data_view.py +++ b/django/applications/catmaid/control/data_view.py @@ -155,7 +155,7 @@ def get_data_view( request, data_view_id ): # Build a stack group index, if stack groups should be made available stackgroup_index = defaultdict(list) stackgroups_of = defaultdict(list) - if show_stackgroups: + if False and show_stackgroups: # Get all stackgroups = StackGroup.objects.filter(project__in=projects) for sg in stackgroups: diff --git a/django/applications/catmaid/static/js/init.js b/django/applications/catmaid/static/js/init.js index 8238ab3657..12a8e20951 100644 --- a/django/applications/catmaid/static/js/init.js +++ b/django/applications/catmaid/static/js/init.js @@ -1157,12 +1157,19 @@ var project; var useExistingViewer = typeof stackViewer !== 'undefined'; var labelupload = ''; - if( e.hasOwnProperty('labelupload_url') && e.tile_source_type === 2 ) { + var selectedMirrorIdx = 0; + var selectedMirror = e.mirrors[selectedMirrorIdx]; + + if( e.hasOwnProperty('labelupload_url') && selectedMirror.tile_source_type === 2 ) { labelupload = e.labelupload_url; } - var tilesource = CATMAID.getTileSource(e.tile_source_type, - e.image_base, e.file_extension, e.tile_width, e.tile_height); + var tilesource = CATMAID.getTileSource( + selectedMirror.tile_source_type, + selectedMirror.image_base, + selectedMirror.file_extension, + selectedMirror.tile_width, + selectedMirror.tile_height); var stack = new CATMAID.Stack( e.sid, @@ -1174,7 +1181,7 @@ var project; e.num_zoom_levels, -2, labelupload, // TODO: if there is any - e.metadata, + e.description, e.orientation, tilesource ); @@ -1200,21 +1207,6 @@ var project; if (!useExistingViewer) { stackViewer.addLayer( "TileLayer", tilelayer ); - $.each(e.overlay, function(key, value) { - var tilesource = CATMAID.getTileSource( value.tile_source_type, - value.image_base, value.file_extension, value.tile_width, value.tile_height ); - var layer_visibility = parseInt(value.default_opacity) > 0; - var tilelayer2 = new tilelayerConstructor( - stackViewer, - value.title, - stack, - tilesource, - layer_visibility, - value.default_opacity / 100, - false); - stackViewer.addLayer( value.title, tilelayer2 ); - }); - project.addStackViewer( stackViewer ); // refresh the overview handler to also register the mouse events on the buttons diff --git a/django/applications/catmaid/static/js/stack-viewer.js b/django/applications/catmaid/static/js/stack-viewer.js index 5bdc590fb2..b50f53f5ac 100644 --- a/django/applications/catmaid/static/js/stack-viewer.js +++ b/django/applications/catmaid/static/js/stack-viewer.js @@ -164,8 +164,8 @@ this._view.appendChild( this._horr ); this.showReferenceLines(StackViewer.Settings.session.display_stack_reference_lines); - if (primaryStack.metadata.length > 0) { - this.addLayer('Stack metadata', new CATMAID.MetadataLayer(this, primaryStack.metadata)); + if (primaryStack.description.length > 0) { + this.addLayer('Stack description', new CATMAID.MetadataLayer(this, primaryStack.description)); } } diff --git a/django/applications/catmaid/static/js/stack.js b/django/applications/catmaid/static/js/stack.js index 23e3eb3aab..185bb561ab 100644 --- a/django/applications/catmaid/static/js/stack.js +++ b/django/applications/catmaid/static/js/stack.js @@ -25,7 +25,7 @@ num_zoom_levels, //!< {int} that defines the number of available non-artificial zoom levels max_zoom_level, //!< {int} that defines the maximum available zoom level labelupload_url, //!< {String} that defines the label upload URL for labels (for tile_source_type==2) - metadata, //!< {String} of arbitrary meta data + description, //!< {String} of arbitrary meta data orientation, //!< {Integer} orientation (0: xy, 1: xz, 2: yz) tileSource ) { @@ -70,7 +70,7 @@ self.MIN_S = max_zoom_level; self.labelupload_url = labelupload_url; - this.metadata = metadata; + this.description = description; self.orientation = orientation; self.tileSource = tileSource;