refactor: rename internal data field to __vf
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -13,7 +13,7 @@ export default () =>
|
||||
Object.assign(node, {
|
||||
id: node.id.toString(),
|
||||
type: node.type || 'default',
|
||||
__rf: {
|
||||
__vf: {
|
||||
position: clampPosition(node.position, nodeExtent),
|
||||
width: undefined,
|
||||
height: undefined,
|
||||
@@ -49,16 +49,16 @@ export default () =>
|
||||
|
||||
if (storeNode) {
|
||||
const updatedNode: Node = Object.assign(storeNode, element)
|
||||
if (!updatedNode.__rf) updatedNode.__rf = {}
|
||||
if (!updatedNode.__vf) updatedNode.__vf = {}
|
||||
|
||||
if (storeNode.position.x !== element.position.x || storeNode.position.y !== element.position.y) {
|
||||
updatedNode.__rf.position = element.position
|
||||
updatedNode.__vf.position = element.position
|
||||
}
|
||||
|
||||
if (typeof element.type !== 'undefined' && element.type !== storeNode.type) {
|
||||
// we reset the elements dimensions here in order to force a re-calculation of the bounds.
|
||||
// When the type of a node changes it is possible that the number or positions of handles changes too.
|
||||
updatedNode.__rf.width = undefined
|
||||
updatedNode.__vf.width = undefined
|
||||
}
|
||||
|
||||
nextElements.nextNodes.push(updatedNode)
|
||||
|
||||
Reference in New Issue
Block a user