message: fix(Display): fix keyboard move layers no bounds bug
diff: @@ -703,15 +703,31 @@ export class Editor extends React.Component<IEditorProps, IEditorStates> {
  if (currentSelectedLayers.length <= 0) { return }
  const { positionXD, positionYD } = direction
  const { currentDisplay, currentSlide, onEditDisplayLayers } = this.props
  + const { slideParams } = this.state
  + const { width: slideWidth, height: slideHeight } = slideParams
  const layers = currentSelectedLayers.map((layer) => {
  - const layerParams = JSON.parse(layer.params)
  - const { positionX, positionY } = layerParams
  + const layerParams: ILayerParams = JSON.parse(layer.params)
  + const { positionX, positionY, width, height } = layerParams
  + let newPositionX = positionXD === 0 ? positionX : (positionX - positionX % GRID_ITEM_MARGIN + positionXD)
  + let newPositionY = positionYD === 0 ? positionY : (positionY - positionY % GRID_ITEM_MARGIN + positionYD)
  + if (newPositionX < 0) {
  + newPositionX = 0
  + }
  + if (newPositionX + width > slideWidth) {
  + newPositionX = slideWidth - width
  + }
  + if (newPositionY < 0) {
  + newPositionY = 0
  + }
  + if (newPositionY + height > slideHeight) {
  + newPositionY = slideHeight - height
  + }
  return {
  ...layer,
  params: JSON.stringify({
  ...layerParams,
  - positionX: positionX - positionX % GRID_ITEM_MARGIN + positionXD,
  - positionY: positionY - positionY % GRID_ITEM_MARGIN + positionYD
  + positionX: newPositionX,
  + positionY: newPositionY
  })
  }
  })
  