@yuneta/gobj-ui 7.4.0 → 7.4.2
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 +4 -2
- package/dist/gobj-ui.es.js +4 -2
- package/package.json +1 -1
- package/src/c_yui_treedb_graph.js +15 -6
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -19915,7 +19915,7 @@ function refresh_legend(gobj) {
|
|
|
19915
19915
|
let $item = (0, _yuneta_gobj_js.createElement2)([
|
|
19916
19916
|
"button",
|
|
19917
19917
|
{
|
|
19918
|
-
class: "GRAPH_LEGEND_ITEM button is-small" + (focused ? " is-primary" : ""),
|
|
19918
|
+
class: "GRAPH_LEGEND_ITEM button is-small" + (focused ? " is-primary is-light" : ""),
|
|
19919
19919
|
title: topic_name,
|
|
19920
19920
|
"aria-label": topic_name,
|
|
19921
19921
|
"aria-pressed": focused ? "true" : "false"
|
|
@@ -19965,7 +19965,9 @@ function ac_legend_topic(gobj, event, kw, src) {
|
|
|
19965
19965
|
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: legend click with no topic`);
|
|
19966
19966
|
return -1;
|
|
19967
19967
|
}
|
|
19968
|
-
|
|
19968
|
+
let next = priv.focus_topic === topic ? "" : topic;
|
|
19969
|
+
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SET_FOCUS_TOPIC", { topic: next }, gobj);
|
|
19970
|
+
(0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_TOPIC_SELECTED", { topic: next });
|
|
19969
19971
|
return 0;
|
|
19970
19972
|
}
|
|
19971
19973
|
/************************************************************
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -19902,7 +19902,7 @@ function refresh_legend(gobj) {
|
|
|
19902
19902
|
let $item = createElement2([
|
|
19903
19903
|
"button",
|
|
19904
19904
|
{
|
|
19905
|
-
class: "GRAPH_LEGEND_ITEM button is-small" + (focused ? " is-primary" : ""),
|
|
19905
|
+
class: "GRAPH_LEGEND_ITEM button is-small" + (focused ? " is-primary is-light" : ""),
|
|
19906
19906
|
title: topic_name,
|
|
19907
19907
|
"aria-label": topic_name,
|
|
19908
19908
|
"aria-pressed": focused ? "true" : "false"
|
|
@@ -19952,7 +19952,9 @@ function ac_legend_topic(gobj, event, kw, src) {
|
|
|
19952
19952
|
log_error(`${gobj_short_name(gobj)}: legend click with no topic`);
|
|
19953
19953
|
return -1;
|
|
19954
19954
|
}
|
|
19955
|
-
|
|
19955
|
+
let next = priv.focus_topic === topic ? "" : topic;
|
|
19956
|
+
gobj_send_event(gobj, "EV_SET_FOCUS_TOPIC", { topic: next }, gobj);
|
|
19957
|
+
gobj_publish_event(gobj, "EV_TOPIC_SELECTED", { topic: next });
|
|
19956
19958
|
return 0;
|
|
19957
19959
|
}
|
|
19958
19960
|
/************************************************************
|
package/package.json
CHANGED
|
@@ -2259,8 +2259,11 @@ function refresh_legend(gobj)
|
|
|
2259
2259
|
let focused = (priv.focus_topic === topic_name);
|
|
2260
2260
|
let $item = createElement2(
|
|
2261
2261
|
['button', {
|
|
2262
|
+
/* `is-light` on the focused one, not solid `is-primary`:
|
|
2263
|
+
* the solid fill sat right behind the swatch and swallowed
|
|
2264
|
+
* the one colour the entry exists to show. */
|
|
2262
2265
|
class: 'GRAPH_LEGEND_ITEM button is-small' +
|
|
2263
|
-
(focused? ' is-primary' : ''),
|
|
2266
|
+
(focused? ' is-primary is-light' : ''),
|
|
2264
2267
|
title: topic_name,
|
|
2265
2268
|
'aria-label': topic_name,
|
|
2266
2269
|
'aria-pressed': focused? 'true' : 'false'
|
|
@@ -2320,11 +2323,17 @@ function ac_legend_topic(gobj, event, kw, src)
|
|
|
2320
2323
|
log_error(`${gobj_short_name(gobj)}: legend click with no topic`);
|
|
2321
2324
|
return -1;
|
|
2322
2325
|
}
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2326
|
+
|
|
2327
|
+
let next = (priv.focus_topic === topic)? "" : topic;
|
|
2328
|
+
|
|
2329
|
+
/* APPLY, then announce — in that order, and both halves are needed.
|
|
2330
|
+
* The host mirrors the announcement into the URL and remembers the
|
|
2331
|
+
* segment it just wrote, so the route change it causes comes back
|
|
2332
|
+
* DEDUPED: a legend that only announced moved the URL and focused
|
|
2333
|
+
* nothing. This is the same contract the topics view keeps, where
|
|
2334
|
+
* clicking a topic shows it and says so. */
|
|
2335
|
+
gobj_send_event(gobj, "EV_SET_FOCUS_TOPIC", {topic: next}, gobj);
|
|
2336
|
+
gobj_publish_event(gobj, "EV_TOPIC_SELECTED", {topic: next});
|
|
2328
2337
|
return 0;
|
|
2329
2338
|
}
|
|
2330
2339
|
|