| T O P I C R E V I E W |
| Mike Buess |
Posted - 04/23/2004 : 08:58:45 AM I've drawn a line on a graph, named it and attached its script to Moved or Sized. Are there any flags available that describe the nature of the movement or sizing? For example, dragging one end of the line will change the length and slope whereas dragging a point in the middle will translate the entire line. Are there any built in properties or variables that can be used to tell the difference between the two actions?
Mike Buess Origin WebRing Member |
| 3 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 04/26/2004 : 12:39:33 PM quote: But you could use the line.x1,x2,y1,y2,dx1,dx2,dy1,dy2 properties to figure that out? You could save the values each time and then check against saved values once the user completes the movement, to determine what changed.
That's what I'm doing now. Just wanted to be sure I wasn't overlooking an easier method.
Thanks Easwar and Sammi,
Mike Buess Origin WebRing Member |
| easwar |
Posted - 04/26/2004 : 10:03:31 AM Hi Mike,
The line.states property can only be used to restrict movements in various degrees of freedom by using the control bits described by Sammi above. It does not however let you determine what kind of movement was performed.
Currently there is no flag that tells you what movement was performed. But you could use the line.x1,x2,y1,y2,dx1,dx2,dy1,dy2 properties to figure that out? You could save the values each time and then check against saved values once the user completes the movement, to determine what changed.
Easwar OriginLab
|
| sammi.song |
Posted - 04/26/2004 : 02:03:32 AM Hi Mike Buess,
Controls object edit states indicates the nature. This property is bit-oriented so that values can be added. Example: Line.states=6, disables rotating and skewing for the object named Line. 0 = all controls are enabled. 1 = resizing is disabled. 2 = rotating is disabled. 4 = skewing is disabled. 8 = moving individual points is disabled. 16 = in place editing is disabled. 32 = resize text label border disabled. 64 = horizontal movement is disabled. 128 = vertical movement is disabled.
Not sure if this meet your expectations, but hope this helps.
Thanks, Sammi |
|
|