Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume you have n objects (or nodes) on the page and the screen viewport is 800x600px. For the purposes of this project, you are required
Assume you have n objects (or nodes) on the page and the screen viewport is 800x600px. For the purposes of this project, you are required to implement an alignment feature where as a user, I can drag and drop items and it will automatically align to the closest node. I can drag items to the left, right, up or down. You can assume that a node is an object on the page of various shapes and sizes with a bounding box consisting of the widest length and height of the shape. Observe the circle and oblong shapes below. Feature Requirements When a user is moving a node in the page, the node can align to: other nodes: Left o Right o Center the page Left o Right o Center Deliverable Note that you do not have to implement the actual feature, pseudo-code will suffice. Create the functions required to implement this feature. These functions should be able to: 1. find the closest node to node X, as node X moves around the page. 2. align node X to the whole page left, right and center
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started