Skip to content

Commit

Permalink
Add toast message (#4322)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalint authored Oct 5, 2023
1 parent f64323a commit 33cf94e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import { childInsertionPath } from '../../../editor/store/insertion-path'
import type { ElementPathTrees } from '../../../../core/shared/element-path-tree'
import { cssPixelLength } from '../../../inspector/common/css-utils'
import type { ProjectContentTreeRoot } from '../../../assets'
import { showToastCommand } from '../../commands/show-toast-command'

export const ConvertToAbsoluteAndMoveStrategyID = 'CONVERT_TO_ABSOLUTE_AND_MOVE_STRATEGY'

Expand Down Expand Up @@ -692,7 +693,14 @@ function createSetParentsToFixedSizeCommands(
]
: []

return [...setWidthCommands, ...setHeightCommands]
const commands = [...setWidthCommands, ...setHeightCommands]
if (commands.length === 0) {
return []
}
return [
...commands,
showToastCommand('Parent is set to fixed size', 'NOTICE', 'set-parent-to-fixed-size'),
]
})
}

Expand Down

0 comments on commit 33cf94e

Please sign in to comment.