From b6c99abb917ebda85d4f86748814ad512607ddf3 Mon Sep 17 00:00:00 2001 From: Tom-TBT Date: Mon, 22 Aug 2022 15:51:40 +0200 Subject: [PATCH 01/32] DeltaT offset from T idx (1-based) --- .../scripts/omero/figure_scripts/Figure_To_Pdf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py index 53b422ef3..be37c0da5 100644 --- a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py +++ b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py @@ -1174,6 +1174,15 @@ def draw_labels(self, panel, page): else: if timestamps and the_t < len(timestamps): d_t = timestamps[the_t] + tmp = expr[1].split("-") + expr[1] = tmp[0] + if len(tmp) > 1: + try: + idx_ref = int(tmp[1]) + if 1 <= idx_ref <= len(timestamps): + d_t -= timestamps[idx_ref-1] + except ValueError: + continue else: d_t = 0 label_value = self.get_time_label_text(d_t, expr[1]) From e6bd374de60915eb7421c58ccda10b24d800d3b8 Mon Sep 17 00:00:00 2001 From: Tom-TBT Date: Mon, 22 Aug 2022 16:07:28 +0200 Subject: [PATCH 02/32] JS DeltaT offset from T idx(1-based) --- src/js/models/panel_model.js | 7 ++++++- src/js/views/panel_view.js | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/models/panel_model.js b/src/js/models/panel_model.js index 56c7340a4..afaabd3f6 100644 --- a/src/js/models/panel_model.js +++ b/src/js/models/panel_model.js @@ -285,7 +285,7 @@ return this.get('deltaT')[theT] || 0; }, - get_time_label_text: function(format) { + get_time_label_text: function(format, shift) { var pad = function(digit) { var d = digit + ""; return d.length === 1 ? ("0"+d) : d; @@ -294,7 +294,12 @@ deltaT = this.get('deltaT')[theT] || 0, isNegative = (deltaT < 0), text = "", h, m, s; + deltaT = Math.abs(deltaT); + if (shift){ + deltaT = deltaT - this.get('deltaT')[parseInt(shift)-1]; + } + if (format === "index") { isNegative = false; text = "" + (theT + 1); diff --git a/src/js/views/panel_view.js b/src/js/views/panel_view.js index 7f0e9cdc5..fe0dbe5b0 100644 --- a/src/js/views/panel_view.js +++ b/src/js/views/panel_view.js @@ -199,7 +199,8 @@ expr = match[0].slice(1,-1).split("."); var label_value = "" if (['time', 't'].includes(expr[0])) { - label_value = self.model.get_time_label_text(expr[1] ? expr[1] : "index"); + value = (expr[1] ? expr[1] : "index").split("-"); + label_value = self.model.get_time_label_text(value[0], value[1]); } else if (['image', 'dataset'].includes(expr[0])){ label_value = self.model.get_name_label_text(expr[0], expr[1] ? expr[1] : "name"); //Escape the underscore for markdown From 42449a2b05d13650d22071666a2a64b589b7ad38 Mon Sep 17 00:00:00 2001 From: Tom-TBT Date: Mon, 22 Aug 2022 16:10:58 +0200 Subject: [PATCH 03/32] Renamed dT offset parameter --- src/js/models/panel_model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/models/panel_model.js b/src/js/models/panel_model.js index afaabd3f6..440273923 100644 --- a/src/js/models/panel_model.js +++ b/src/js/models/panel_model.js @@ -285,7 +285,7 @@ return this.get('deltaT')[theT] || 0; }, - get_time_label_text: function(format, shift) { + get_time_label_text: function(format, offset_idx) { var pad = function(digit) { var d = digit + ""; return d.length === 1 ? ("0"+d) : d; @@ -297,7 +297,7 @@ deltaT = Math.abs(deltaT); if (shift){ - deltaT = deltaT - this.get('deltaT')[parseInt(shift)-1]; + deltaT = deltaT - this.get('deltaT')[parseInt(offset_idx)-1]; } if (format === "index") { From 0148cd4320e3beea1328605bdf97240d494acfd4 Mon Sep 17 00:00:00 2001 From: Tom-TBT Date: Fri, 9 Sep 2022 10:30:04 +0200 Subject: [PATCH 04/32] Default to 0 when shift with no timestamps --- src/js/models/panel_model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/models/panel_model.js b/src/js/models/panel_model.js index 440273923..4a9a8b3d4 100644 --- a/src/js/models/panel_model.js +++ b/src/js/models/panel_model.js @@ -296,8 +296,8 @@ text = "", h, m, s; deltaT = Math.abs(deltaT); - if (shift){ - deltaT = deltaT - this.get('deltaT')[parseInt(offset_idx)-1]; + if (offset_idx){ + deltaT = deltaT - this.get('deltaT')[parseInt(offset_idx)-1] || 0; } if (format === "index") { From 7a10b1d964d74134f3bf4c69d3c1363afd203b80 Mon Sep 17 00:00:00 2001 From: Tom-TBT Date: Fri, 9 Sep 2022 17:18:33 +0200 Subject: [PATCH 05/32] Added precision param to time and XYZWH labels --- .../omero/figure_scripts/Figure_To_Pdf.py | 63 +++++++++++++------ src/js/models/panel_model.js | 35 ++++++----- src/js/views/panel_view.js | 9 ++- 3 files changed, 69 insertions(+), 38 deletions(-) diff --git a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py index be37c0da5..797cd6907 100644 --- a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py +++ b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py @@ -1087,34 +1087,36 @@ def get_crop_region(self, panel): return {'x': cropx, 'y': cropy, 'width': tile_w, 'height': tile_h} - def get_time_label_text(self, delta_t, format): + def get_time_label_text(self, delta_t, format, dec_prec): """ Gets the text for 'live' time-stamp labels """ # format of "secs" by default is_negative = delta_t < 0 delta_t = abs(delta_t) - text = "%d s" % int(round(delta_t)) + npad = 2 + dec_prec + (dec_prec > 0) if format in ["milliseconds", "ms"]: - text = "%s ms" % int(round(delta_t * 1000)) + text = "%.*f ms" % (dec_prec, delta_t * 1000) elif format in ["secs", "seconds", "s"]: - text = "%d s" % int(round(delta_t)) + text = "%.*f s" % (dec_prec, delta_t) elif format in ["mins", "minutes", "m"]: - text = "%s mins" % int(round(delta_t / 60)) + text = "%.*f mins" % (dec_prec, delta_t / 60) elif format in ["mins:secs", "m:s"]: m = int(delta_t // 60) - s = round(delta_t % 60) - text = "%s:%02d" % (m, s) + s = delta_t % 60 + text = "%s:%0*.*f" % (m, npad, dec_prec, s) elif format in ["hrs:mins", "h:m"]: h = int(delta_t // 3600) - m = int(round((delta_t % 3600) / 60)) - text = "%s:%02d" % (h, m) + m = (delta_t % 3600) / 60 + text = "%s:%0*.*f" % (h, npad, dec_prec, m) elif format in ["hrs:mins:secs", "h:m:s"]: h = int(delta_t // 3600) m = (delta_t % 3600) // 60 - s = round(delta_t % 60) - text = "%s:%02d:%02d" % (h, m, s) + s = delta_t % 60 + text = "%s:%02d:%0*.*f" % (h, m, npad, dec_prec, s) else: # Format unknown return "" - if text in ["0 s", "0:00", "0 mins", "0:00:00"]: + dec_str = "" if dec_prec == 0 else "." + "0" * dec_prec + if text in ["0"+dec_str+" s", "0:00"+dec_str, + "0"+dec_str+" mins", "0:00:00"+dec_str]: is_negative = False return ('-' if is_negative else '') + text @@ -1172,20 +1174,32 @@ def draw_labels(self, panel, page): if len(expr) == 1 or expr[1] == "index": label_value = str(the_t + 1) else: + tmp = expr[-1].split("-") + expr[-1] = tmp[0] if timestamps and the_t < len(timestamps): d_t = timestamps[the_t] - tmp = expr[1].split("-") - expr[1] = tmp[0] if len(tmp) > 1: try: idx_ref = int(tmp[1]) if 1 <= idx_ref <= len(timestamps): d_t -= timestamps[idx_ref-1] + else: + d_t = 0 except ValueError: - continue + d_t = 0 else: d_t = 0 - label_value = self.get_time_label_text(d_t, expr[1]) + + dec_prec = 0 + if len(expr) > 2: + try: + dec_prec = int(expr[2]) + except ValueError: + dec_prec = 0 + + label_value = self.get_time_label_text(d_t, + expr[1], + dec_prec) elif expr[0] == "image": format = expr[1] if len(expr) > 1 else "name" @@ -1224,6 +1238,11 @@ def draw_labels(self, panel, page): elif prop == "rot": prop = "rotation" + try: + dec_prec = int(expr[2]) if len(expr) > 2 else 2 + except ValueError: + dec_prec = 2 # Default is 2 + if prop == "z": size_z = panel.get('sizeZ') pixel_size_z = panel.get('pixel_size_z') @@ -1238,8 +1257,10 @@ def draw_labels(self, panel, page): label_value = (str(z_start + 1) + "-" + str(z_end + 1)) elif format == "unit" and size_z: - z_start = f"{(z_start * pixel_size_z):.2f}" - z_end = f"{(z_end * pixel_size_z):.2f}" + z_start = "%.*f" % (dec_prec, + (z_start * pixel_size_z)) + z_end = "%.*f" % (dec_prec, + (z_end * pixel_size_z)) label_value = (z_start + " " + z_symbol + " - " + z_end + " " + z_symbol) else: @@ -1248,7 +1269,8 @@ def draw_labels(self, panel, page): label_value = str(the_z + 1) elif (format == "unit" and size_z and the_z < size_z): - z_pos = f"{(the_z * pixel_size_z):.2f}" + z_pos = "%.*f" % (dec_prec, + (the_z * pixel_size_z)) label_value = (z_pos + " " + z_symbol) elif prop == "rotation": @@ -1264,7 +1286,8 @@ def draw_labels(self, panel, page): scale = panel['pixel_size_x'] elif prop in ['y', 'height']: scale = panel['pixel_size_y'] - rounded = f"{(value * scale):.2f}" + rounded = "%.*f" % (dec_prec, + (value * scale)) label_value = ("" + rounded + " " + panel['pixel_size_x_symbol']) diff --git a/src/js/models/panel_model.js b/src/js/models/panel_model.js index 4a9a8b3d4..328cc3531 100644 --- a/src/js/models/panel_model.js +++ b/src/js/models/panel_model.js @@ -285,47 +285,49 @@ return this.get('deltaT')[theT] || 0; }, - get_time_label_text: function(format, offset_idx) { + get_time_label_text: function(format, offset_idx, dec_prec) { var pad = function(digit) { var d = digit + ""; return d.length === 1 ? ("0"+d) : d; }; var theT = this.get('theT'), deltaT = this.get('deltaT')[theT] || 0, - isNegative = (deltaT < 0), text = "", h, m, s; - deltaT = Math.abs(deltaT); if (offset_idx){ deltaT = deltaT - this.get('deltaT')[parseInt(offset_idx)-1] || 0; } + var isNegative = (deltaT < 0); + deltaT = Math.abs(deltaT); + var padlen = dec_prec>0 ? dec_places+3 : 2; if (format === "index") { isNegative = false; text = "" + (theT + 1); } else if (['milliseconds', 'ms'].includes(format)) { - text = Math.round(deltaT*1000) + " ms"; + text = (deltaT*1000).toFixed(dec_prec) + " ms"; } else if (['seconds', 'secs', 's'].includes(format)) { - text = Math.round(deltaT) + " s"; + text = deltaT.toFixed(dec_prec) + " s"; } else if (['minutes', 'mins', 'm'].includes(format)) { - text = Math.round(deltaT / 60) + " mins"; + text = (deltaT / 60).toFixed(dec_prec) + " mins"; } else if (["mins:secs", "m:s"].includes(format)) { m = parseInt(deltaT / 60); - s = pad(Math.round(deltaT % 60)); + s = ((deltaT % 60).toFixed(dec_prec)).padStart(padlen, "0"); text = m + ":" + s; } else if (["hrs:mins", "h:m"].includes(format)) { h = parseInt(deltaT / 3600); - m = pad(Math.round((deltaT % 3600) / 60)); + m = (((deltaT % 3600) / 60).toFixed(dec_prec)).padStart(padlen, "0"); text = h + ":" + m; } else if (["hrs:mins:secs", "h:m:s"].includes(format)) { h = parseInt(deltaT / 3600); m = pad(parseInt((deltaT % 3600) / 60)); - s = pad(Math.round(deltaT % 60)); + s = ((deltaT % 60).toFixed(dec_prec)).padStart(padlen, "0"); text = h + ":" + m + ":" + s; } else { // Format unknown return "" } - if (["0 s", "0:00", "0 mins", "0:00:00"].indexOf(text) > -1) { + var dec_str = dec_prec>0 ? "."+"0".repeat(dec_prec) : ""; + if (["0"+dec_str+" s", "0"+dec_str+" mins", "0:00"+dec_str, "0:00:00"+dec_str].indexOf(text) > -1) { isNegative = false; } return (isNegative ? '-' : '') + text; @@ -350,7 +352,7 @@ return text; }, - get_view_label_text: function(property, format) { + get_view_label_text: function(property, format, dec_prec) { if (format === "px") format = "pixel"; if (property === "w") property = "width"; @@ -366,6 +368,9 @@ z_size = this.get('pixel_size_z'); z_size = z_size?z_size:0 + dec_prec = parseInt(dec_prec) + dec_prec = dec_prec?dec_prec:2 + var text = ""; if (property === "z") { if (this.get('z_projection')) { @@ -374,8 +379,8 @@ if (format === "pixel") { text = "" + (start+1) + " - " + (end+1); } else if (format === "unit"){ - start = (start * z_size).toFixed(2) - end = (end * z_size).toFixed(2) + start = (start * z_size).toFixed(dec_prec) + end = (end * z_size).toFixed(dec_prec) text = ""+ start +" "+ z_symbol + " - " + end +" "+ z_symbol } @@ -385,7 +390,7 @@ if (format === "pixel") { text = "" + (theZ + 1); } else if (format === "unit"){ - text = ""+ (theZ * z_size).toFixed(2) +" "+ z_symbol + text = ""+ (theZ * z_size).toFixed(dec_prec) +" "+ z_symbol } } return text @@ -398,7 +403,7 @@ return ""+parseInt(value); } else if (format === "unit") { scale = ['x', 'width'].includes(property) ? x_size : y_size - text = ""+ (value * scale).toFixed(2) +" "+ x_symbol + text = ""+ (value * scale).toFixed(dec_prec) +" "+ x_symbol } return text }, diff --git a/src/js/views/panel_view.js b/src/js/views/panel_view.js index fe0dbe5b0..377f9e6f1 100644 --- a/src/js/views/panel_view.js +++ b/src/js/views/panel_view.js @@ -199,14 +199,17 @@ expr = match[0].slice(1,-1).split("."); var label_value = "" if (['time', 't'].includes(expr[0])) { - value = (expr[1] ? expr[1] : "index").split("-"); - label_value = self.model.get_time_label_text(value[0], value[1]); + tmp = expr[expr.length-1].split("-"); + expr[expr.length-1] = tmp[0]; + dec_prec = (expr[2] ? parseInt(expr[2]) : 0); // decimal places matters only when the format isn't default + label_value = self.model.get_time_label_text(expr[1] ? expr[1] : "index", tmp[1], dec_prec); } else if (['image', 'dataset'].includes(expr[0])){ label_value = self.model.get_name_label_text(expr[0], expr[1] ? expr[1] : "name"); //Escape the underscore for markdown label_value = label_value.replaceAll("_", "\\_"); } else if (['x', 'y', 'z', 'width', 'height', 'w', 'h', 'rotation', 'rot'].includes(expr[0])){ - label_value = self.model.get_view_label_text(expr[0], expr[1] ? expr[1] : "pixel"); + dec_prec = (expr[2] ? parseInt(expr[2]) : 2); // decimal places matters only when the format isn't default + label_value = self.model.get_view_label_text(expr[0], expr[1] ? expr[1] : "pixel", dec_prec); } else if (['channels', 'c'].includes(expr[0])) { label_value = self.model.get_channels_label_text(); } From 33a41560b17b364ce69a5cab651d98735a7b90a9 Mon Sep 17 00:00:00 2001 From: Tom-TBT Date: Mon, 12 Sep 2022 16:07:46 +0200 Subject: [PATCH 06/32] Refactoring code --- .../omero/figure_scripts/Figure_To_Pdf.py | 48 +++++++++---------- src/js/models/panel_model.js | 8 ++-- src/js/views/panel_view.js | 8 ++-- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py index 797cd6907..c79d75597 100644 --- a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py +++ b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py @@ -1167,35 +1167,37 @@ def draw_labels(self, panel, page): expr = item.group()[1:-1].split(".") label_value = "" + tmp = expr[-1].split("-") + expr[-1] = tmp[0] + ref_idx = None + if len(tmp) > 1: + try: + ref_idx = int(tmp[1]) + except ValueError: + pass + + dec_prec = 0 + if len(expr) > 2: + try: + dec_prec = int(expr[2]) + except ValueError: + pass + if expr[0] in ["time", "t"]: the_t = panel['theT'] timestamps = panel.get('deltaT') # default to index if len(expr) == 1 or expr[1] == "index": + if ref_idx is not None: + the_t -= ref_idx label_value = str(the_t + 1) else: - tmp = expr[-1].split("-") - expr[-1] = tmp[0] + d_t = 0 if timestamps and the_t < len(timestamps): d_t = timestamps[the_t] - if len(tmp) > 1: - try: - idx_ref = int(tmp[1]) - if 1 <= idx_ref <= len(timestamps): - d_t -= timestamps[idx_ref-1] - else: - d_t = 0 - except ValueError: - d_t = 0 - else: - d_t = 0 - - dec_prec = 0 - if len(expr) > 2: - try: - dec_prec = int(expr[2]) - except ValueError: - dec_prec = 0 + if ref_idx is not None: + if 1 <= ref_idx <= len(timestamps): + d_t -= timestamps[ref_idx-1] label_value = self.get_time_label_text(d_t, expr[1], @@ -1238,10 +1240,8 @@ def draw_labels(self, panel, page): elif prop == "rot": prop = "rotation" - try: - dec_prec = int(expr[2]) if len(expr) > 2 else 2 - except ValueError: - dec_prec = 2 # Default is 2 + # Set the default precision value (2) if not given + dec_prec = dec_prec if len(expr) > 2 else 2 if prop == "z": size_z = panel.get('sizeZ') diff --git a/src/js/models/panel_model.js b/src/js/models/panel_model.js index 328cc3531..eff619bd5 100644 --- a/src/js/models/panel_model.js +++ b/src/js/models/panel_model.js @@ -285,7 +285,7 @@ return this.get('deltaT')[theT] || 0; }, - get_time_label_text: function(format, offset_idx, dec_prec) { + get_time_label_text: function(format, ref_idx, dec_prec) { var pad = function(digit) { var d = digit + ""; return d.length === 1 ? ("0"+d) : d; @@ -294,13 +294,13 @@ deltaT = this.get('deltaT')[theT] || 0, text = "", h, m, s; - if (offset_idx){ - deltaT = deltaT - this.get('deltaT')[parseInt(offset_idx)-1] || 0; + if (ref_idx){ + deltaT = deltaT - this.get('deltaT')[parseInt(ref_idx)-1] || 0; } var isNegative = (deltaT < 0); deltaT = Math.abs(deltaT); - var padlen = dec_prec>0 ? dec_places+3 : 2; + var padlen = dec_prec>0 ? dec_prec+3 : 2; if (format === "index") { isNegative = false; text = "" + (theT + 1); diff --git a/src/js/views/panel_view.js b/src/js/views/panel_view.js index 377f9e6f1..daeb36a11 100644 --- a/src/js/views/panel_view.js +++ b/src/js/views/panel_view.js @@ -198,11 +198,13 @@ var new_text = new_text + ljson.text.slice(last_idx, match.index); expr = match[0].slice(1,-1).split("."); var label_value = "" + + ref_idx = expr[expr.length-1].split("-"); + expr[expr.length-1] = ref_idx[0]; + if (['time', 't'].includes(expr[0])) { - tmp = expr[expr.length-1].split("-"); - expr[expr.length-1] = tmp[0]; dec_prec = (expr[2] ? parseInt(expr[2]) : 0); // decimal places matters only when the format isn't default - label_value = self.model.get_time_label_text(expr[1] ? expr[1] : "index", tmp[1], dec_prec); + label_value = self.model.get_time_label_text(expr[1] ? expr[1] : "index", ref_idx[1], dec_prec); } else if (['image', 'dataset'].includes(expr[0])){ label_value = self.model.get_name_label_text(expr[0], expr[1] ? expr[1] : "name"); //Escape the underscore for markdown From 146d300670db1cb51d0887add01039d3a9ed2ab5 Mon Sep 17 00:00:00 2001 From: Tom-TBT Date: Mon, 12 Sep 2022 16:37:22 +0200 Subject: [PATCH 07/32] Bug fix in text between dynamic label --- omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py index c79d75597..f7ea81b44 100644 --- a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py +++ b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py @@ -1188,8 +1188,6 @@ def draw_labels(self, panel, page): timestamps = panel.get('deltaT') # default to index if len(expr) == 1 or expr[1] == "index": - if ref_idx is not None: - the_t -= ref_idx label_value = str(the_t + 1) else: d_t = 0 @@ -1299,7 +1297,7 @@ def draw_labels(self, panel, page): label_value = " ".join(label_value) new_text.append(label_value if label_value else item.group()) - last_idx += item.end() + last_idx = item.end() new_text.append(l['text'][last_idx:]) l['text'] = "".join(new_text) From 18e6259ec8d4a7c7e851671ffd88273e17dc6976 Mon Sep 17 00:00:00 2001 From: Tom-TBT Date: Tue, 13 Sep 2022 09:14:33 +0200 Subject: [PATCH 08/32] Dec prec bug fix --- omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py index f7ea81b44..c7791f27f 100644 --- a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py +++ b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py @@ -1176,7 +1176,7 @@ def draw_labels(self, panel, page): except ValueError: pass - dec_prec = 0 + dec_prec = None if len(expr) > 2: try: dec_prec = int(expr[2]) @@ -1197,6 +1197,9 @@ def draw_labels(self, panel, page): if 1 <= ref_idx <= len(timestamps): d_t -= timestamps[ref_idx-1] + # Set the default precision value (0) if not given + dec_prec = 0 if dec_prec is None else dec_prec + label_value = self.get_time_label_text(d_t, expr[1], dec_prec) @@ -1239,7 +1242,7 @@ def draw_labels(self, panel, page): prop = "rotation" # Set the default precision value (2) if not given - dec_prec = dec_prec if len(expr) > 2 else 2 + dec_prec = 2 if dec_prec is None else dec_prec if prop == "z": size_z = panel.get('sizeZ') From c174fcb5606e50401ddaa763c9a62f07ade82402 Mon Sep 17 00:00:00 2001 From: Tom-TBT Date: Tue, 13 Sep 2022 09:42:49 +0200 Subject: [PATCH 09/32] updated tip window --- omero_figure/templates/figure/index.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/omero_figure/templates/figure/index.html b/omero_figure/templates/figure/index.html index be8960037..2f2dbe551 100644 --- a/omero_figure/templates/figure/index.html +++ b/omero_figure/templates/figure/index.html @@ -516,7 +516,7 @@ -