Skip to content

Commit

Permalink
fix incorrect editRestrictions docs
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed Jul 25, 2024
1 parent bec1365 commit 3c02a39
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/editor/src/API/EditorOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ interface EditorOptions {
*/
layers?: TileLayer[];
/**
* Callback that's being called before certain edit-operations are executed.
* A operation can be restricted or allowed, controlled by the respective return value.
* Callback that is called before certain edit operations are executed.
* This callback can be used to allow or restrict specific edit operations based on the return value.
*
* @param feature - the map feature
* @param restrictionMask - restrictionMask represents a bitmask for the desired edit operations.
* 1 -\> GEOMETRY CHANGE
* 2 -\> REMOVE
* @param feature - The map feature to be edited.
* @param restrictionMask - A bitmask representing the desired edit operations:
* 1 - GEOMETRY CHANGE
* 2 - REMOVE
*
* @returns true -\> Allow operation(s) and execute edits. false -\> forbid operation(s). No edit gets executed.
* @returns {boolean} - Return `false` to allow the operation(s) and execute the edits.
* Return `true` to forbid the operation(s); no edits will be executed.
*
* @defaultValue
* @defaultValue false
*/
editRestrictions?: (feature: Feature, restrictionMask: number) => boolean;

Expand Down

0 comments on commit 3c02a39

Please sign in to comment.