@yuneta/gobj-ui 7.23.106 → 7.23.107
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/dist/gobj-ui.cjs.js +8 -3
- package/dist/gobj-ui.es.js +8 -3
- package/package.json +1 -1
- package/src/c_g6_nodes_tree.js +24 -3
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -56082,8 +56082,13 @@ function figure_shape_of(gobj, desc, record, geometry, flags) {
|
|
|
56082
56082
|
let labels = (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "node_labels");
|
|
56083
56083
|
let figure = node_figure_of(gobj, desc, geometry || {});
|
|
56084
56084
|
let paint = node_paint_of(gobj, desc, geometry);
|
|
56085
|
-
let
|
|
56086
|
-
let
|
|
56085
|
+
let fill = dark ? mix_colors(paint.fill, .25, "#2c3542") : mix_colors(paint.fill, .1, "#ffffff");
|
|
56086
|
+
let stroke = dark ? mix_colors(paint.fill, .85, "#ffffff") : paint.fill;
|
|
56087
|
+
let line_width = 2;
|
|
56088
|
+
if (paint.stroke !== getStrokeColor(paint.fill)) {
|
|
56089
|
+
stroke = paint.stroke;
|
|
56090
|
+
line_width = Math.max(paint.lineWidth, 2);
|
|
56091
|
+
}
|
|
56087
56092
|
if (f.selected) {
|
|
56088
56093
|
stroke = SELECT_RING;
|
|
56089
56094
|
line_width = 3;
|
|
@@ -56101,7 +56106,7 @@ function figure_shape_of(gobj, desc, record, geometry, flags) {
|
|
|
56101
56106
|
let style = {
|
|
56102
56107
|
size: [side, side],
|
|
56103
56108
|
radius: figure === "square" ? Math.round(side / 5) : 0,
|
|
56104
|
-
fill
|
|
56109
|
+
fill,
|
|
56105
56110
|
stroke,
|
|
56106
56111
|
lineWidth: line_width,
|
|
56107
56112
|
lineDash: dash,
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -56077,8 +56077,13 @@ function figure_shape_of(gobj, desc, record, geometry, flags) {
|
|
|
56077
56077
|
let labels = gobj_read_bool_attr(gobj, "node_labels");
|
|
56078
56078
|
let figure = node_figure_of(gobj, desc, geometry || {});
|
|
56079
56079
|
let paint = node_paint_of(gobj, desc, geometry);
|
|
56080
|
-
let
|
|
56081
|
-
let
|
|
56080
|
+
let fill = dark ? mix_colors(paint.fill, .25, "#2c3542") : mix_colors(paint.fill, .1, "#ffffff");
|
|
56081
|
+
let stroke = dark ? mix_colors(paint.fill, .85, "#ffffff") : paint.fill;
|
|
56082
|
+
let line_width = 2;
|
|
56083
|
+
if (paint.stroke !== getStrokeColor(paint.fill)) {
|
|
56084
|
+
stroke = paint.stroke;
|
|
56085
|
+
line_width = Math.max(paint.lineWidth, 2);
|
|
56086
|
+
}
|
|
56082
56087
|
if (f.selected) {
|
|
56083
56088
|
stroke = SELECT_RING;
|
|
56084
56089
|
line_width = 3;
|
|
@@ -56096,7 +56101,7 @@ function figure_shape_of(gobj, desc, record, geometry, flags) {
|
|
|
56096
56101
|
let style = {
|
|
56097
56102
|
size: [side, side],
|
|
56098
56103
|
radius: figure === "square" ? Math.round(side / 5) : 0,
|
|
56099
|
-
fill
|
|
56104
|
+
fill,
|
|
56100
56105
|
stroke,
|
|
56101
56106
|
lineWidth: line_width,
|
|
56102
56107
|
lineDash: dash,
|
package/package.json
CHANGED
package/src/c_g6_nodes_tree.js
CHANGED
|
@@ -2456,8 +2456,29 @@ function figure_shape_of(gobj, desc, record, geometry, flags)
|
|
|
2456
2456
|
let figure = node_figure_of(gobj, desc, geometry || {});
|
|
2457
2457
|
let paint = node_paint_of(gobj, desc, geometry);
|
|
2458
2458
|
|
|
2459
|
-
|
|
2460
|
-
|
|
2459
|
+
/* THE SAME PAINT AS THE CARD, and that is the point: a card, a
|
|
2460
|
+
* pill and a figure are one record drawn at three sizes, so they
|
|
2461
|
+
* cannot wear two different colour languages. The card is html and
|
|
2462
|
+
* writes `color-mix()`; a canvas shape cannot, so the same mix is
|
|
2463
|
+
* computed here -- with `mix_colors()`, which is in this file
|
|
2464
|
+
* already and for this very reason (the ports).
|
|
2465
|
+
*
|
|
2466
|
+
* It also gives the figure an EDGE. It used to be the raw topic
|
|
2467
|
+
* colour filled, ringed by `getStrokeColor()` -- the same colour
|
|
2468
|
+
* darkened 20%, which measures 1.4:1 against its own fill: not a
|
|
2469
|
+
* border, a ramp, and a fan of them reads as a blurred picture.
|
|
2470
|
+
* Tint inside, vivid colour around it, and the canto is there. */
|
|
2471
|
+
let fill = dark? mix_colors(paint.fill, 0.25, "#2c3542")
|
|
2472
|
+
: mix_colors(paint.fill, 0.10, "#ffffff");
|
|
2473
|
+
let stroke = dark? mix_colors(paint.fill, 0.85, "#ffffff") : paint.fill;
|
|
2474
|
+
let line_width = 2;
|
|
2475
|
+
/* A paint somebody CHOSE (a node's or a topic's own, saved in
|
|
2476
|
+
* `__graphs__`) is not ours to reinterpret: it comes through as
|
|
2477
|
+
* it was chosen. */
|
|
2478
|
+
if(paint.stroke !== getStrokeColor(paint.fill)) {
|
|
2479
|
+
stroke = paint.stroke;
|
|
2480
|
+
line_width = Math.max(paint.lineWidth, 2);
|
|
2481
|
+
}
|
|
2461
2482
|
if(f.selected) {
|
|
2462
2483
|
stroke = SELECT_RING;
|
|
2463
2484
|
line_width = 3;
|
|
@@ -2480,7 +2501,7 @@ function figure_shape_of(gobj, desc, record, geometry, flags)
|
|
|
2480
2501
|
let style = {
|
|
2481
2502
|
size: [side, side],
|
|
2482
2503
|
radius: (figure === 'square')? Math.round(side / 5) : 0,
|
|
2483
|
-
fill:
|
|
2504
|
+
fill: fill,
|
|
2484
2505
|
stroke: stroke,
|
|
2485
2506
|
lineWidth: line_width,
|
|
2486
2507
|
lineDash: dash,
|