refactor(boolean-props): omit is prefix
This commit is contained in:
@@ -9,7 +9,7 @@ function applyChanges(changes: NodeChange[] | EdgeChange[], elements: any[]): an
|
||||
if (currentChange) {
|
||||
switch (currentChange.type) {
|
||||
case 'select': {
|
||||
res.push({ ...item, isSelected: currentChange.isSelected });
|
||||
res.push({ ...item, selected: currentChange.selected });
|
||||
return res;
|
||||
}
|
||||
case 'dimensions': {
|
||||
@@ -24,8 +24,8 @@ function applyChanges(changes: NodeChange[] | EdgeChange[], elements: any[]): an
|
||||
updateItem.position = currentChange.position;
|
||||
}
|
||||
|
||||
if (typeof currentChange.isDragging !== 'undefined') {
|
||||
updateItem.isDragging = currentChange.isDragging;
|
||||
if (typeof currentChange.dragging !== 'undefined') {
|
||||
updateItem.dragging = currentChange.dragging;
|
||||
}
|
||||
|
||||
res.push(updateItem);
|
||||
|
||||
+2
-2
@@ -149,7 +149,7 @@ export const getNodesInside = (
|
||||
height: rect.height / tScale,
|
||||
});
|
||||
|
||||
return nodes.filter(({ selectable = true, position, width, height, isDragging }) => {
|
||||
return nodes.filter(({ selectable = true, position, width, height, dragging }) => {
|
||||
if (excludeNonSelectableNodes && !selectable) {
|
||||
return false;
|
||||
}
|
||||
@@ -164,7 +164,7 @@ export const getNodesInside = (
|
||||
typeof height === 'undefined' ||
|
||||
width === null ||
|
||||
height === null ||
|
||||
isDragging
|
||||
dragging
|
||||
) {
|
||||
// nodes are initialized with width and height = null
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user