mol_plot_all 1.2.534 → 1.2.535

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.js CHANGED
@@ -4760,143 +4760,6 @@ var $;
4760
4760
  ;
4761
4761
  "use strict";
4762
4762
  var $;
4763
- (function ($) {
4764
- class $mol_svg_text_box extends $mol_svg_group {
4765
- font_size() {
4766
- return 16;
4767
- }
4768
- width() {
4769
- return 0;
4770
- }
4771
- sub() {
4772
- return [
4773
- this.Back(),
4774
- this.Text()
4775
- ];
4776
- }
4777
- box_width() {
4778
- return "0.5rem";
4779
- }
4780
- box_height() {
4781
- return "1rem";
4782
- }
4783
- box_pos_x() {
4784
- return this.pos_x();
4785
- }
4786
- box_pos_y() {
4787
- return "0";
4788
- }
4789
- Back() {
4790
- const obj = new this.$.$mol_svg_rect();
4791
- obj.width = () => this.box_width();
4792
- obj.height = () => this.box_height();
4793
- obj.pos = () => [
4794
- this.box_pos_x(),
4795
- this.box_pos_y()
4796
- ];
4797
- return obj;
4798
- }
4799
- pos_x() {
4800
- return "0";
4801
- }
4802
- pos_y() {
4803
- return "100%";
4804
- }
4805
- align() {
4806
- return "start";
4807
- }
4808
- text() {
4809
- return "";
4810
- }
4811
- Text() {
4812
- const obj = new this.$.$mol_svg_text();
4813
- obj.pos = () => [
4814
- this.pos_x(),
4815
- this.pos_y()
4816
- ];
4817
- obj.align = () => this.align();
4818
- obj.sub = () => [
4819
- this.text()
4820
- ];
4821
- return obj;
4822
- }
4823
- }
4824
- __decorate([
4825
- $mol_mem
4826
- ], $mol_svg_text_box.prototype, "Back", null);
4827
- __decorate([
4828
- $mol_mem
4829
- ], $mol_svg_text_box.prototype, "Text", null);
4830
- $.$mol_svg_text_box = $mol_svg_text_box;
4831
- })($ || ($ = {}));
4832
- //mol/svg/text/box/-view.tree/box.view.tree.ts
4833
- ;
4834
- "use strict";
4835
- var $;
4836
- (function ($) {
4837
- let canvas;
4838
- function $mol_font_canvas(next = canvas) {
4839
- if (!next)
4840
- next = $mol_dom_context.document.createElement('canvas').getContext('2d');
4841
- return canvas = next;
4842
- }
4843
- $.$mol_font_canvas = $mol_font_canvas;
4844
- })($ || ($ = {}));
4845
- //mol/font/canvas/canvas.ts
4846
- ;
4847
- "use strict";
4848
- var $;
4849
- (function ($) {
4850
- function $mol_font_measure(font, text) {
4851
- const canvas = $mol_font_canvas();
4852
- canvas.font = font;
4853
- return canvas.measureText(text).width;
4854
- }
4855
- $.$mol_font_measure = $mol_font_measure;
4856
- })($ || ($ = {}));
4857
- //mol/font/measure/measure.ts
4858
- ;
4859
- "use strict";
4860
- var $;
4861
- (function ($) {
4862
- var $$;
4863
- (function ($$) {
4864
- class $mol_svg_text_box extends $.$mol_svg_text_box {
4865
- box_width() {
4866
- return `${this.width()}px`;
4867
- }
4868
- width() {
4869
- return $mol_font_measure(this.font_size() + 'px ' + this.font_family(), this.text());
4870
- }
4871
- box_pos_x() {
4872
- const align = this.align();
4873
- if (align === 'end')
4874
- return `calc(${this.pos_x()} - ${this.width()})`;
4875
- if (align === 'middle')
4876
- return `calc(${this.pos_x()} - ${Math.round(this.width() / 2)})`;
4877
- return this.pos_x();
4878
- }
4879
- box_pos_y() {
4880
- return `calc(${this.pos_y()} - ${this.font_size() - 2})`;
4881
- }
4882
- }
4883
- __decorate([
4884
- $mol_mem
4885
- ], $mol_svg_text_box.prototype, "width", null);
4886
- $$.$mol_svg_text_box = $mol_svg_text_box;
4887
- })($$ = $.$$ || ($.$$ = {}));
4888
- })($ || ($ = {}));
4889
- //mol/svg/text/box/box.view.ts
4890
- ;
4891
- "use strict";
4892
- var $;
4893
- (function ($) {
4894
- $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");
4895
- })($ || ($ = {}));
4896
- //mol/svg/text/box/-css/box.view.css.ts
4897
- ;
4898
- "use strict";
4899
- var $;
4900
4763
  (function ($) {
4901
4764
  class $mol_plot_ruler extends $mol_plot_graph {
4902
4765
  step() {
@@ -4986,7 +4849,7 @@ var $;
4986
4849
  return "start";
4987
4850
  }
4988
4851
  Title() {
4989
- const obj = new this.$.$mol_svg_text_box();
4852
+ const obj = new this.$.$mol_svg_text();
4990
4853
  obj.pos_x = () => this.title_pos_x();
4991
4854
  obj.pos_y = () => this.title_pos_y();
4992
4855
  obj.align = () => this.title_align();
@@ -5121,7 +4984,10 @@ var $;
5121
4984
  return [this.Curve()];
5122
4985
  }
5123
4986
  front() {
5124
- return [this.Background(), ...this.labels_formatted(), this.Title()];
4987
+ return [
4988
+ ...this.labels_formatted(),
4989
+ this.Title()
4990
+ ];
5125
4991
  }
5126
4992
  }
5127
4993
  __decorate([
@@ -5141,7 +5007,7 @@ var $;
5141
5007
  "use strict";
5142
5008
  var $;
5143
5009
  (function ($) {
5144
- $mol_style_attach("mol/plot/ruler/ruler.view.css", "[mol_plot_ruler_curve] {\n\tcolor: var(--mol_theme_line);\n\tstroke-width: 1px;\n\tstroke: currentColor;\n}\n\n[mol_plot_ruler_label] {\n\tcolor: var(--mol_theme_text);\n}\n\n[mol_plot_ruler_title] {\n\tcolor: var(--mol_theme_shade);\n\tbackground-color: var(--mol_theme_back);\n}\n\n[mol_plot_ruler_background] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n\topacity: 0.8;\n}\n");
5010
+ $mol_style_attach("mol/plot/ruler/ruler.view.css", "[mol_plot_ruler_curve] {\n\tcolor: var(--mol_theme_line);\n\tstroke-width: 1px;\n\tstroke: currentColor;\n}\n\n[mol_plot_ruler_label] {\n\tcolor: var(--mol_theme_text);\n\ttext-shadow: 0 -1px var(--mol_theme_back), 0px 1px var(--mol_theme_back);\n}\n\n[mol_plot_ruler_title] {\n\tcolor: var(--mol_theme_shade);\n\tbackground-color: var(--mol_theme_back);\n\ttext-shadow: 0 -1px var(--mol_theme_back), 0px 1px var(--mol_theme_back);\n}\n\n[mol_plot_ruler_background] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n\topacity: 0.8;\n}\n");
5145
5011
  })($ || ($ = {}));
5146
5012
  //mol/plot/ruler/-css/ruler.view.css.ts
5147
5013
  ;
@@ -5305,6 +5171,143 @@ var $;
5305
5171
  ;
5306
5172
  "use strict";
5307
5173
  var $;
5174
+ (function ($) {
5175
+ class $mol_svg_text_box extends $mol_svg_group {
5176
+ font_size() {
5177
+ return 16;
5178
+ }
5179
+ width() {
5180
+ return 0;
5181
+ }
5182
+ sub() {
5183
+ return [
5184
+ this.Back(),
5185
+ this.Text()
5186
+ ];
5187
+ }
5188
+ box_width() {
5189
+ return "0.5rem";
5190
+ }
5191
+ box_height() {
5192
+ return "1rem";
5193
+ }
5194
+ box_pos_x() {
5195
+ return this.pos_x();
5196
+ }
5197
+ box_pos_y() {
5198
+ return "0";
5199
+ }
5200
+ Back() {
5201
+ const obj = new this.$.$mol_svg_rect();
5202
+ obj.width = () => this.box_width();
5203
+ obj.height = () => this.box_height();
5204
+ obj.pos = () => [
5205
+ this.box_pos_x(),
5206
+ this.box_pos_y()
5207
+ ];
5208
+ return obj;
5209
+ }
5210
+ pos_x() {
5211
+ return "0";
5212
+ }
5213
+ pos_y() {
5214
+ return "100%";
5215
+ }
5216
+ align() {
5217
+ return "start";
5218
+ }
5219
+ text() {
5220
+ return "";
5221
+ }
5222
+ Text() {
5223
+ const obj = new this.$.$mol_svg_text();
5224
+ obj.pos = () => [
5225
+ this.pos_x(),
5226
+ this.pos_y()
5227
+ ];
5228
+ obj.align = () => this.align();
5229
+ obj.sub = () => [
5230
+ this.text()
5231
+ ];
5232
+ return obj;
5233
+ }
5234
+ }
5235
+ __decorate([
5236
+ $mol_mem
5237
+ ], $mol_svg_text_box.prototype, "Back", null);
5238
+ __decorate([
5239
+ $mol_mem
5240
+ ], $mol_svg_text_box.prototype, "Text", null);
5241
+ $.$mol_svg_text_box = $mol_svg_text_box;
5242
+ })($ || ($ = {}));
5243
+ //mol/svg/text/box/-view.tree/box.view.tree.ts
5244
+ ;
5245
+ "use strict";
5246
+ var $;
5247
+ (function ($) {
5248
+ let canvas;
5249
+ function $mol_font_canvas(next = canvas) {
5250
+ if (!next)
5251
+ next = $mol_dom_context.document.createElement('canvas').getContext('2d');
5252
+ return canvas = next;
5253
+ }
5254
+ $.$mol_font_canvas = $mol_font_canvas;
5255
+ })($ || ($ = {}));
5256
+ //mol/font/canvas/canvas.ts
5257
+ ;
5258
+ "use strict";
5259
+ var $;
5260
+ (function ($) {
5261
+ function $mol_font_measure(font, text) {
5262
+ const canvas = $mol_font_canvas();
5263
+ canvas.font = font;
5264
+ return canvas.measureText(text).width;
5265
+ }
5266
+ $.$mol_font_measure = $mol_font_measure;
5267
+ })($ || ($ = {}));
5268
+ //mol/font/measure/measure.ts
5269
+ ;
5270
+ "use strict";
5271
+ var $;
5272
+ (function ($) {
5273
+ var $$;
5274
+ (function ($$) {
5275
+ class $mol_svg_text_box extends $.$mol_svg_text_box {
5276
+ box_width() {
5277
+ return `${this.width()}px`;
5278
+ }
5279
+ width() {
5280
+ return $mol_font_measure(this.font_size() + 'px ' + this.font_family(), this.text());
5281
+ }
5282
+ box_pos_x() {
5283
+ const align = this.align();
5284
+ if (align === 'end')
5285
+ return `calc(${this.pos_x()} - ${this.width()})`;
5286
+ if (align === 'middle')
5287
+ return `calc(${this.pos_x()} - ${Math.round(this.width() / 2)})`;
5288
+ return this.pos_x();
5289
+ }
5290
+ box_pos_y() {
5291
+ return `calc(${this.pos_y()} - ${this.font_size() - 2})`;
5292
+ }
5293
+ }
5294
+ __decorate([
5295
+ $mol_mem
5296
+ ], $mol_svg_text_box.prototype, "width", null);
5297
+ $$.$mol_svg_text_box = $mol_svg_text_box;
5298
+ })($$ = $.$$ || ($.$$ = {}));
5299
+ })($ || ($ = {}));
5300
+ //mol/svg/text/box/box.view.ts
5301
+ ;
5302
+ "use strict";
5303
+ var $;
5304
+ (function ($) {
5305
+ $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");
5306
+ })($ || ($ = {}));
5307
+ //mol/svg/text/box/-css/box.view.css.ts
5308
+ ;
5309
+ "use strict";
5310
+ var $;
5308
5311
  (function ($) {
5309
5312
  class $mol_plot_mark_cross extends $mol_plot_graph {
5310
5313
  labels() {