@elicdavis/node-flow 0.1.9 → 0.1.10
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/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/index.html +7 -2
- package/package.json +1 -1
- package/src/node.ts +11 -4
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3942,14 +3942,16 @@ var NodeState = /* @__PURE__ */ ((NodeState2) => {
|
|
|
3942
3942
|
NodeState2[NodeState2["Grabbed"] = 2] = "Grabbed";
|
|
3943
3943
|
return NodeState2;
|
|
3944
3944
|
})(NodeState || {});
|
|
3945
|
-
var _text7;
|
|
3945
|
+
var _text7, _alwaysShow;
|
|
3946
3946
|
var MessageRenderer = class {
|
|
3947
3947
|
constructor(config) {
|
|
3948
3948
|
__privateAdd(this, _text7);
|
|
3949
|
+
__privateAdd(this, _alwaysShow);
|
|
3950
|
+
__privateSet(this, _alwaysShow, config.alwaysShow ? config.alwaysShow : false);
|
|
3949
3951
|
__privateSet(this, _text7, new Text(
|
|
3950
3952
|
config.message,
|
|
3951
3953
|
{
|
|
3952
|
-
color: MessageTypeColor(config.type ? config.type : "info" /* Info */)
|
|
3954
|
+
color: config.color ? config.color : MessageTypeColor(config.type ? config.type : "info" /* Info */)
|
|
3953
3955
|
},
|
|
3954
3956
|
{
|
|
3955
3957
|
LineSpacing: 2.5,
|
|
@@ -3957,13 +3959,17 @@ var MessageRenderer = class {
|
|
|
3957
3959
|
}
|
|
3958
3960
|
));
|
|
3959
3961
|
}
|
|
3960
|
-
render(ctx, scale, position) {
|
|
3962
|
+
render(ctx, scale, position, hovering) {
|
|
3963
|
+
if (!__privateGet(this, _alwaysShow) && !hovering) {
|
|
3964
|
+
return 0;
|
|
3965
|
+
}
|
|
3961
3966
|
ctx.textAlign = "center" /* Center */;
|
|
3962
3967
|
__privateGet(this, _text7).render(ctx, scale, position);
|
|
3963
3968
|
return __privateGet(this, _text7).height(ctx) * scale;
|
|
3964
3969
|
}
|
|
3965
3970
|
};
|
|
3966
3971
|
_text7 = new WeakMap();
|
|
3972
|
+
_alwaysShow = new WeakMap();
|
|
3967
3973
|
var _position, _title2, _subTitle, _infoSymbol, _infoText, _messages, _input, _output, _widgets, _locked, _canEditTitle, _canEditInfo, _canEditPorts, _contextMenu2, _metadata, _onSelect, _onUnselect, _onFiledrop, _onDragStop, _titleChangeCallback, _infoChangeCallback, _titleColor, _selectedStyle, _stateStyles, _padding2, _portTextStyle, _elementSpacing, _selected, _inputPortPositions, _outputPortPositions, _widgetPositions, _data, _registeredAnyPropertyChangeCallbacks, _registeredPropertyChangeCallbacks, _FlowNode_instances, popupNodeTitleSelection_fn, popupNodeInfoSelection_fn, popupNewButtonWidget_fn, widgetSubmenu_fn, calculateStyle_fn;
|
|
3968
3974
|
var FlowNode = class {
|
|
3969
3975
|
constructor(config) {
|
|
@@ -4659,7 +4665,7 @@ var FlowNode = class {
|
|
|
4659
4665
|
messageStart.y = nodeBounds.Position.y + nodeBounds.Size.y + 15 * camera.zoom;
|
|
4660
4666
|
for (let i = 0; i < __privateGet(this, _messages).length; i++) {
|
|
4661
4667
|
const message = __privateGet(this, _messages)[i];
|
|
4662
|
-
messageStart.y += message.render(ctx, camera.zoom, messageStart) + 10 * camera.zoom;
|
|
4668
|
+
messageStart.y += message.render(ctx, camera.zoom, messageStart, !(state === 0 /* Idle */)) + 10 * camera.zoom;
|
|
4663
4669
|
}
|
|
4664
4670
|
});
|
|
4665
4671
|
}
|