mol_plot_all 1.2.777 → 1.2.778

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/web.mjs CHANGED
@@ -4792,7 +4792,8 @@ var $;
4792
4792
  ...super.attr(),
4793
4793
  x: this.pos_x(),
4794
4794
  y: this.pos_y(),
4795
- "text-anchor": this.align()
4795
+ "text-anchor": this.align_hor(),
4796
+ "alignment-baseline": this.align_vert()
4796
4797
  };
4797
4798
  }
4798
4799
  sub() {
@@ -4809,6 +4810,12 @@ var $;
4809
4810
  align() {
4810
4811
  return "middle";
4811
4812
  }
4813
+ align_hor() {
4814
+ return this.align();
4815
+ }
4816
+ align_vert() {
4817
+ return "baseline";
4818
+ }
4812
4819
  text() {
4813
4820
  return "";
4814
4821
  }
@@ -5440,7 +5447,7 @@ var $;
5440
5447
  "use strict";
5441
5448
  var $;
5442
5449
  (function ($) {
5443
- $mol_style_attach("mol/svg/text/box/box.view.css", "[mol_svg_text_box_back] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n}\n");
5450
+ $mol_style_attach("mol/svg/text/box/box.view.css", "[mol_svg_text_box_back] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n\ttransition: none;\n}\n");
5444
5451
  })($ || ($ = {}));
5445
5452
  //mol/svg/text/box/-css/box.view.css.ts
5446
5453
  ;
@@ -5454,6 +5461,9 @@ var $;
5454
5461
  title_x_gap() {
5455
5462
  return 4;
5456
5463
  }
5464
+ title_y_gap() {
5465
+ return 22;
5466
+ }
5457
5467
  threshold() {
5458
5468
  return 16;
5459
5469
  }
@@ -5620,6 +5630,13 @@ var $;
5620
5630
  return '0';
5621
5631
  return nearest.scaled.y.toFixed(3);
5622
5632
  }
5633
+ title_y_pos_x() {
5634
+ const nearest = this.nearest();
5635
+ if (!nearest)
5636
+ return '0';
5637
+ const pos = this.title_y_gap();
5638
+ return pos.toFixed(3);
5639
+ }
5623
5640
  }
5624
5641
  __decorate([
5625
5642
  $mol_mem
package/web.view.tree CHANGED
@@ -318,7 +318,8 @@ $mol_svg_text $mol_svg
318
318
  ^
319
319
  x <= pos_x \
320
320
  y <= pos_y \
321
- text-anchor <= align \middle
321
+ text-anchor <= align_hor <= align \middle
322
+ alignment-baseline <= align_vert \baseline
322
323
  sub /
323
324
  <= text \
324
325
 
@@ -404,6 +405,7 @@ $mol_svg_text_box $mol_svg_group
404
405
  $mol_plot_mark_cross $mol_plot_graph
405
406
  labels /string
406
407
  title_x_gap 4
408
+ title_y_gap 22
407
409
  threshold 16
408
410
  graphs /$mol_plot_graph
409
411
  dimensions $mol_vector_2d /