@elicdavis/node-flow 0.1.19 → 0.1.20

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.mjs CHANGED
@@ -2026,7 +2026,7 @@ var NumberWidget = class {
2026
2026
  return { "x": width, "y": height };
2027
2027
  }
2028
2028
  Set(newNumber) {
2029
- if (this.#value === newNumber) {
2029
+ if (Object.is(this.#value, newNumber)) {
2030
2030
  return;
2031
2031
  }
2032
2032
  this.#value = newNumber;
@@ -2314,7 +2314,7 @@ var SliderWidget = class {
2314
2314
  }
2315
2315
  SetValue(newValue) {
2316
2316
  const cleanedValue = Clamp(newValue, this.#min, this.#max);
2317
- if (this.#value === cleanedValue) {
2317
+ if (Object.is(this.#value, cleanedValue)) {
2318
2318
  return;
2319
2319
  }
2320
2320
  this.#value = cleanedValue;
@@ -3913,6 +3913,14 @@ var NodeSubsystem2 = class {
3913
3913
  this.#removeNodeConnections(nodeIndex);
3914
3914
  const node = this.#nodes[nodeIndex];
3915
3915
  this.#nodes.splice(nodeIndex, 1);
3916
+ if (this.#nodeHovering === nodeIndex) {
3917
+ this.#nodeHovering = -1;
3918
+ } else if (this.#nodeHovering > nodeIndex) {
3919
+ this.#nodeHovering--;
3920
+ }
3921
+ if (this.#portHovering?.Node === node) {
3922
+ this.#portHovering = null;
3923
+ }
3916
3924
  requestRender();
3917
3925
  for (let i = 0; i < this.#nodeRemovedCallbacks.length; i++) {
3918
3926
  this.#nodeRemovedCallbacks[i](node);
@@ -4498,7 +4506,7 @@ var FlowNode = class {
4498
4506
  }
4499
4507
  setProperty(name, value) {
4500
4508
  const oldValue = this.#data[name];
4501
- if (oldValue === value) {
4509
+ if (Object.is(oldValue, value)) {
4502
4510
  return;
4503
4511
  }
4504
4512
  this.#data[name] = value;
@@ -4951,10 +4959,6 @@ var FlowNode = class {
4951
4959
  return this.#title.get();
4952
4960
  }
4953
4961
  setTitle(newTitle) {
4954
- if (!this.#canEditTitle) {
4955
- console.warn("setTitle instruction ignored, as node has been marked un-editable");
4956
- return;
4957
- }
4958
4962
  let cleaned = newTitle;
4959
4963
  if (cleaned === null || cleaned === void 0) {
4960
4964
  cleaned = "";
@@ -4971,9 +4975,6 @@ var FlowNode = class {
4971
4975
  }
4972
4976
  }
4973
4977
  setInfo(newInfo) {
4974
- if (!this.#canEditInfo) {
4975
- console.warn("setInfo instruction ignored, as node has been marked un-editable");
4976
- }
4977
4978
  let cleaned = newInfo;
4978
4979
  if (cleaned === null || cleaned === void 0) {
4979
4980
  cleaned = "";