+ const node = this.getNode() as ImageNode;
+ let startingWidth = element.clientWidth;
+ let startingHeight = element.clientHeight;
+ let startingRatio = startingWidth / startingHeight;
+ let hasHeight = false;
+ context.editor.getEditorState().read(() => {
+ startingWidth = node.getWidth() || startingWidth;
+ startingHeight = node.getHeight() || startingHeight;
+ if (node.getHeight()) {
+ hasHeight = true;
+ }
+ startingRatio = startingWidth / startingHeight;
+ });
+
+ const flipXChange = element.classList.contains('nw') || element.classList.contains('sw');
+ const flipYChange = element.classList.contains('nw') || element.classList.contains('ne');