@ -3944,7 +3944,7 @@ class App extends React.Component<AppProps, AppState> {
const [ gridX , gridY ] = getGridPoint (
scenePointerX ,
scenePointerY ,
this . state . gridSize ,
event [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ;
const [ lastCommittedX , lastCommittedY ] =
@ -4761,7 +4761,11 @@ class App extends React.Component<AppProps, AppState> {
origin ,
withCmdOrCtrl : event [ KEYS . CTRL_OR_CMD ] ,
originInGrid : tupleToCoors (
getGridPoint ( origin . x , origin . y , this . state . gridSize ) ,
getGridPoint (
origin . x ,
origin . y ,
event [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ,
) ,
scrollbars : isOverScrollBars (
currentScrollBars ,
@ -5285,7 +5289,11 @@ class App extends React.Component<AppProps, AppState> {
sceneY : number ;
link : string ;
} ) = > {
const [ gridX , gridY ] = getGridPoint ( sceneX , sceneY , this . state . gridSize ) ;
const [ gridX , gridY ] = getGridPoint (
sceneX ,
sceneY ,
this . lastPointerDown ? . [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ;
const embedLink = getEmbedLink ( link ) ;
@ -5331,7 +5339,11 @@ class App extends React.Component<AppProps, AppState> {
sceneX : number ;
sceneY : number ;
} ) = > {
const [ gridX , gridY ] = getGridPoint ( sceneX , sceneY , this . state . gridSize ) ;
const [ gridX , gridY ] = getGridPoint (
sceneX ,
sceneY ,
this . lastPointerDown ? . [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ;
const topLayerFrame = this . getTopLayerFrameAtSceneCoords ( {
x : gridX ,
@ -5414,7 +5426,7 @@ class App extends React.Component<AppProps, AppState> {
const [ gridX , gridY ] = getGridPoint (
pointerDownState . origin . x ,
pointerDownState . origin . y ,
this . state . gridSize ,
event [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ;
const topLayerFrame = this . getTopLayerFrameAtSceneCoords ( {
@ -5507,7 +5519,7 @@ class App extends React.Component<AppProps, AppState> {
const [ gridX , gridY ] = getGridPoint (
pointerDownState . origin . x ,
pointerDownState . origin . y ,
this . state. gridSize ,
this . lastPointerDown? . [ KEYS . CTRL_OR_CMD ] ? null : this . state. gridSize ,
) ;
const topLayerFrame = this . getTopLayerFrameAtSceneCoords ( {
@ -5565,7 +5577,7 @@ class App extends React.Component<AppProps, AppState> {
const [ gridX , gridY ] = getGridPoint (
pointerDownState . origin . x ,
pointerDownState . origin . y ,
this . state. gridSize ,
this . lastPointerDown? . [ KEYS . CTRL_OR_CMD ] ? null : this . state. gridSize ,
) ;
const frame = newFrameElement ( {
@ -5648,7 +5660,7 @@ class App extends React.Component<AppProps, AppState> {
const [ gridX , gridY ] = getGridPoint (
pointerCoords . x ,
pointerCoords . y ,
this . state . gridSize ,
event [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ;
// for arrows/lines, don't start dragging until a given threshold
@ -5694,6 +5706,7 @@ class App extends React.Component<AppProps, AppState> {
this . state . selectedLinearElement ,
pointerCoords ,
this . state ,
! event [ KEYS . CTRL_OR_CMD ] ,
) ;
if ( ! ret ) {
return ;
@ -5819,7 +5832,7 @@ class App extends React.Component<AppProps, AppState> {
const [ dragX , dragY ] = getGridPoint (
pointerCoords . x - pointerDownState . drag . offset . x ,
pointerCoords . y - pointerDownState . drag . offset . y ,
this . state . gridSize ,
event [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ;
const [ dragDistanceX , dragDistanceY ] = [
@ -5886,7 +5899,7 @@ class App extends React.Component<AppProps, AppState> {
const [ originDragX , originDragY ] = getGridPoint (
pointerDownState . origin . x - pointerDownState . drag . offset . x ,
pointerDownState . origin . y - pointerDownState . drag . offset . y ,
this . state . gridSize ,
event [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ;
mutateElement ( duplicatedElement , {
x : duplicatedElement.x + ( originDragX - dragX ) ,
@ -7679,7 +7692,7 @@ class App extends React.Component<AppProps, AppState> {
const [ gridX , gridY ] = getGridPoint (
pointerCoords . x ,
pointerCoords . y ,
this . state . gridSize ,
event [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ;
const image =
@ -7748,7 +7761,7 @@ class App extends React.Component<AppProps, AppState> {
const [ resizeX , resizeY ] = getGridPoint (
pointerCoords . x - pointerDownState . resize . offset . x ,
pointerCoords . y - pointerDownState . resize . offset . y ,
this . state . gridSize ,
event [ KEYS . CTRL_OR_CMD ] ? null : this . state . gridSize ,
) ;
const frameElementsOffsetsMap = new Map <