Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Lock objects- Walls, Area, Racks #10

Merged
merged 10 commits into from
Sep 22, 2023
Merged

Conversation

justin-davisibm
Copy link
Contributor

This feature partially closes #6, by providing a mechanism to lock/unlock Areas within the canvas.

To process this change: I've added an additional custom_meta.object_type field to the wall and area objects, mirroring what you already use for the overall floor area and racks.

A new Lock/Unlock Object button is added to the left hand nav, acting as a toggle switch- calling lock_floorplan_object()

The lock_floorplan_object() function evaluates the selected object, determines if it is a wall, area or other (based on code the "other" option would be rack. When the object is locked, rotation, X/Y movement and the mt, mb, ml, mr and mtr resize/rotation props are disabled.

When the object is unlocked:

  • If it is a Rack: Rotation, X/Y movement and mtr rotation props are re-enabled
  • if it is a Wall/Area: rotation, X/Y movement and the mt, mb, ml, mr and mtr resize/rotation props are re-enabled.

I do believe this is a semi-breaking change for existing wall/area uses. If desired I could likely add in an edit/redraw section to the toggle to handle an undefined case. Let me know.

@tbotnz tbotnz merged commit 58096fa into tbotnz:dev Sep 22, 2023
1 check passed
@tbotnz tbotnz mentioned this pull request Sep 26, 2023
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants