diff --git a/types/paper/index.d.ts b/types/paper/index.d.ts index 6c1f2979fb..08a6d794ad 100644 --- a/types/paper/index.d.ts +++ b/types/paper/index.d.ts @@ -21,26 +21,7 @@ declare module paper { /** * Gives access to paper's configurable settings. */ - export var settings: { - - /** - * controls whether newly created items are automatically inserted into the scene graph, by adding them to project.activeLayer — default: true - */ - insertItems: boolean; - /** - * controls what value newly created items have their item.applyMatrix property set to (Note that not all items can set this to false) — default: true - */ - applyMatrix: boolean; - /** - * the size of the curve handles when drawing selections — default: 4 - */ - handleSize: number; - /* - * the default tolerance for hit- tests, when no value is specified — default: 0 - */ - hitTolerance: number; - - }; + export var settings: Settings; /** * The currently active project. @@ -1163,13 +1144,7 @@ declare module paper { /** * Gives access to paper's configurable settings. */ - settings: { - - applyMatrix: boolean; - handleSize: number; - hitTolerance: number; - - }; + settings: Settings; /** * The currently active project. @@ -5481,6 +5456,25 @@ declare module paper { type: 'mousedown' | 'mouseup' | 'mousedrag' | 'click' | 'doubleclick' | 'mousemove' | 'mouseenter' | 'mouseleave'; } + + export interface Settings { + /** + * controls whether newly created items are automatically inserted into the scene graph, by adding them to project.activeLayer — default: true + */ + insertItems: boolean; + /** + * controls what value newly created items have their item.applyMatrix property set to (Note that not all items can set this to false) — default: true + */ + applyMatrix: boolean; + /** + * the size of the curve handles when drawing selections — default: 4 + */ + handleSize: number; + /* + * the default tolerance for hit- tests, when no value is specified — default: 0 + */ + hitTolerance: number; + } } declare module 'paper' diff --git a/types/paper/paper-tests.ts b/types/paper/paper-tests.ts index 1d1bc32abe..280b68c0e9 100644 --- a/types/paper/paper-tests.ts +++ b/types/paper/paper-tests.ts @@ -81,6 +81,10 @@ hitTestResults = paper.project.hitTestAll(hitTestPoint, hitOptionsInterfaceFull) paper.view.scaling = new paper.Point(1, 1); +paper.settings.insertItems = true +const paperScope = new paper.PaperScope(); +paperScope.settings.insertItems = false; + function Examples() { function BooleanOperations(){ let text = new paper.PointText({