Changes between Version 6 and Version 7 of FRAME_POSITION_R0
- Timestamp:
- 12/11/08 12:46:17 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FRAME_POSITION_R0
v6 v7 7 7 8 8 == Overview == 9 The frames could have different position(coordinates) in relation to the upper left angle of the page. They could overlap and the frame should always be able to fit into the page. Therefore whenever a negative coordinate occurs(because of a drag and drop for example) the page size and position is recalculated. That way the negative coordinate is set to 0. Other frames recalculate their coordinates as well so that their relative positions are kept. The same is done for a bigger than page hight or width coordinate. There is a "clipping part" of the page though and in reader mode only the frames that are inside it are visible.9 The frames position(coordinates) are calculated in relation to the upper left angle of the page which has coordinates (0,0). Frames could overlap and/or not fit into the page. Even when some frames or frame parts are outside the page`s range they are still a part of the working area and should be seen in author mode. They however should be clipped out in reader mode so that the reader stays unaware of them. 10 10 11 11 == Task requirements == 12 * The frame should have property for the distance to the top of the page. It should be greater than 0 and less than (page`s hight-frame`s high). 13 * The frame should have property for the distance to the left end of the page. It should be greater than 0 and less than (page`s width-frame`s width). 12 * The frame should have properties (x,y for example) defining its position in relation to the page. 14 13 15 14 == Task result == … … 17 16 18 17 == Implementation idea == 19 * Create Position class extending !ProObject with properties for the frame s upper left position.18 * Create Position class extending !ProObject with properties for the frame`s position (the upper left corner of the frame). 20 19 * Add Position position property to the Frame. 21 * Recalculate all coordinates when needed so that the conditions are kept for all frames.22 20 23 21 == Related == … … 30 28 == How to demo == 31 29 * Create frame with concrete coordinates and check if they are correct. 32 * Try creating a frame with incorrect coordinates.33 30 * Change the frames coordinates and check that its position is updated.