Child pages
  • Client Design Mode

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: spelling

...

The elements can only be dragged in within their own original form part. So a an element that original originally is in the body part will stay in the body part.

The client design mode will not save the new positions/sizes of the elements, this is someting something that the developer has to take care of. By saving and restoring these elements for each user individualy individually you can give the user his personal layouts. To save and restore positions/sizes it is important to give all you the elements namesa name, so you can reach address them by code using elements.elementName.

You can enter client design mode using:

...

If you want to do something with the modifications of the user, you should put specify handlers when you do to design mode, samplefor example:

Code Block
 controller.setDesignMode(onDrag,onDrop,onSelect,onResize)

...

Every element that is selected will get this event, you can return true if you want the user to be able to select it, or false if you don't want that the users uses that element in clientDesign mode. It is better practice to set your element not selectable with the client design properties before you go into clientDesign mode because then the element is really not selectable and if you use this method you could see the element being selected for a fraction of a second of selection. 

onResize

Handle Handles the resize resizing of a an element. This The onResize method is a good position place to save the element sizes.

...

There are two client design properties: selectable and handles.

Selectable

By default an element with a name is selectable in client design mode but you can set elements to not be selectable.

...

By default the elements have all the 8 handles (all the corners and all the sides (left, right, top, bottom, topleft, topright, bottomleft, bottomright)) if they are selectable.


It is possible to set specific handles. For example only left and right if you want the user to be able to change the width of the element but not the height.

...