Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class draw2d.SnapToGeometry

    Object
       |
       +--draw2d.SnapToHelper
             |
             +--draw2d.SnapToGeometry

class draw2d.SnapToGeometry
extends draw2d.SnapToHelper

Defined in SnapToGeometry.js
Version: 0.9.14
Author: Andreas Herz

Field Summary
`<static> Object` | `THRESHOLD`

Fields inherited from class draw2d.SnapToHelper
`workflow`

Constructor Summary
`draw2d.SnapToGeometry ( workflow)`

Method Summary
`Object` | `getCorrectionFor( entries, value, side)`
`void` | `populateRowsAndCols()` Updates the cached row and column Entries using the provided parts.
`Object` | `snapPoint( snapOrientation, inputPoint, resultPoint)` Applies a snapping correction to the given result.
`Object` | `snapRectangle( inputBounds, resultBounds)` Applies a snap correction to a Rectangle based on a given Rectangle.

Field Detail

### THRESHOLD

    <static> Object THRESHOLD

Constructor Detail

### draw2d.SnapToGeometry

    draw2d.SnapToGeometry( workflow)

Version: 0.9.14
Author: Andreas Herz

Method Detail

### getCorrectionFor

    Object getCorrectionFor( entries, value, side)

### populateRowsAndCols

    void populateRowsAndCols()

Updates the cached row and column Entries using the provided parts.

Parameters:

`parts` - a List of EditParts

### snapPoint

    Object snapPoint( snapOrientation, inputPoint, resultPoint)

Applies a snapping correction to the given result. Snapping can occur in the four primary directions: NORTH, SOUTH, EAST, WEST, as defined. By default a Point is treated as an empty Rectangle. Only NORTH and WEST should be used in general. But SOUTH and EAST may also be used.

### snapRectangle

    Object snapRectangle( inputBounds, resultBounds)

Applies a snap correction to a Rectangle based on a given Rectangle. The provided baseRect will be used as a reference for snapping. The types of snapping to be performed are indicated by the snapOrientation parameter. The correction is applied to the result field.

All coordinate information received and returned by this method should be in absolute coordinates.

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Thu Feb 7 23:45:47 2008