handleMouseMove method
void
handleMouseMove(
- Offset localPosition
)
Implementation
void handleMouseMove(Offset localPosition) {
widget.children?.where((element) => element.isSelected).forEach((element) {
if (element.isResizing) {
setState(() {
element.resize(_mouse, localPosition);
});
} else if (element.isRotating) {
setState(() {
element.rotate(_mouse, localPosition);
});
} else if (element.isDragging) {
setState(() {
element.translate(_mouse, localPosition);
});
}
});
widget.onMouseLocationChange?.call(localPosition);
_mouse = localPosition;
}