updateSelectedLayerPosition method

bool updateSelectedLayerPosition(
  1. Offset position,
  2. Size canvasSize
)

更新选中图层的位置

Implementation

bool updateSelectedLayerPosition(Offset position, Size canvasSize) {
  if (_selectedLayerId != null && _layers.containsKey(_selectedLayerId)) {
    _layers[_selectedLayerId]!.updateAbsolutePosition(position, canvasSize);
    return true;
  }
  return false;
}