cranvas (version 0.8.5)

sync_limits: Sync layer limits

Description

The limits information is stored in the meta data as meta$limits, of which this function makes use to sync the limits of layers.

Usage

sync_limits(meta, ...)

Arguments

meta
the meta data contains a matrix of limits in meta$limits
...
an arbitrary number of layers

Value

NULL (an event is attached on meta$limits so that whenever the limits are changed, the layers will be updated using the new limits)

Details

An event is attached to meta$limits so that whenever it is changed, the limits all the layers will be reset by the method layer$setLimits(), hence we only need to take care of meta$limits and this function will do the rest of work.

Besides, the size and position of the brush will be restored.

Examples

Run this code
## sync_limits(meta, layer1, layer2, layer3)

Run the code above in your browser using DataCamp Workspace