Skip to content

Commit bc4de96

Browse files
authored
Merge pull request #760 from DigitalSlideArchive/fix-755
Fix a bug when changing the color or line width of all elements.
2 parents 6784145 + 5945fcb commit bc4de96

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

plugin_tests/histomicstk_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def testGetDockerImage(self):
216216
resp = self.request(
217217
path='/HistomicsTK/HistomicsTK/docker_image',
218218
user=self.admin, method='PUT',
219-
params={'name': '"girder/slicer_cli_web:small"'})
219+
params={'name': '"girder/slicer_cli_web:small-2.x"'})
220220
self.assertStatusOk(resp)
221221
endTime = time.time() + 180 # maxTimeout
222222
while time.time() < endTime:

web_client/dialogs/saveAnnotation.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,20 @@ var SaveAnnotation = View.extend({
108108
// all valid
109109

110110
if (setFillColor || setLineColor || setLineWidth) {
111-
this.annotation.get('annotation').elements.forEach((element) => {
111+
this.annotation.elements().each((element) => { /* eslint-disable backbone/no-silent */
112112
if (setFillColor) {
113-
element.fillColor = fillColor;
113+
element.set('fillColor', fillColor, {silent: true});
114114
}
115115
if (setLineColor) {
116-
element.lineColor = lineColor;
116+
element.set('lineColor', lineColor, {silent: true});
117117
}
118118
if (setLineWidth) {
119-
element.lineWidth = lineWidth;
119+
element.set('lineWidth', lineWidth, {silent: true});
120120
}
121121
});
122+
const annotationData = _.extend({}, this.annotation.get('annotation'));
123+
annotationData.elements = this.annotation.elements().toJSON();
124+
this.annotation.set('annotation', annotationData);
122125
}
123126

124127
_.extend(this.annotation.get('annotation'), {

0 commit comments

Comments
 (0)