inspector/propertyDrafts.svelte#

Classes#

PropertyDrafts#

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:122

The drafts and refusals of the Properties, Elisions and Regions tabs, and the open blocks of the Elisions tab.

Constructors#

Constructor#

new PropertyDrafts(): PropertyDrafts

Returns#

PropertyDrafts

Methods#

commit()#

commit(geometry, property, store): string | null

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:182

Commit the draft of property as one set: dropped once the store accepts it (a draft of the stored value dispatches nothing), kept with the refusal otherwise. Returns the notice of what it wrote, if any.

Parameters#
geometry#

Geometry

property#

"length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"

store#

Store

Returns#

string | null

commitField()#

commitField(owner, field, store, edit): void

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:312

Commit the draft of a field as the one command edit makes of it: dropped once the store accepts it (a draft of the stored value dispatches nothing), kept with the refusal otherwise.

Parameters#
owner#

FieldOwner

field#

DraftField

store#

Store

edit#

(text) => Result<Command | null>

Returns#

void

commitName()#

commitName(field, store): void

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:257

Commit the name’s draft as one set: dropped once the store accepts it (a draft of the stored name dispatches nothing), kept with the refusal otherwise.

Parameters#
field#

NameField

store#

Store

Returns#

void

discard()#

discard(geometry, property): void

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:173

Drop the draft of property and its refusal.

Parameters#
geometry#

Geometry

property#

"length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"

Returns#

void

discardField()#

discardField(owner, field): void

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:303

Drop the draft of a field and its refusal.

Parameters#
owner#

FieldOwner

field#

DraftField

Returns#

void

discardName()#

discardName(field): void

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:248

Drop the name’s draft and its refusal.

Parameters#
field#

NameField

Returns#

void

fieldProblem()#

fieldProblem(owner, field): string | undefined

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:293

Why the last commit of a field was refused; undefined while it was not.

Parameters#
owner#

FieldOwner

field#

DraftField

Returns#

string | undefined

fieldValue()#

fieldValue(owner, field, stored): string

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:288

What a field shows: its draft, else stored, the text of the value it holds.

Parameters#
owner#

FieldOwner

field#

DraftField

stored#

string

Returns#

string

nameProblem()#

nameProblem(field): string | undefined

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:237

Why the last commit of the name was refused; undefined while it was not.

Parameters#
field#

NameField

Returns#

string | undefined

nameValue()#

nameValue(field): string

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:232

What the name field shows: its draft, else the stored name (empty for none).

Parameters#
field#

NameField

Returns#

string

open()#

open(key, open): void

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:336

Keep the block of key open or closed.

Parameters#
key#

string

open#

boolean

Returns#

void

opened()#

opened(key, byDefault): boolean

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:331

Whether the Elisions tab’s block of key is open: as it was last shown or hidden, else byDefault.

Parameters#
key#

string

byDefault#

boolean

Returns#

boolean

placeholder()#

placeholder(geometry, property): string | undefined

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:160

A field’s placeholder: “mixed” while the containers differ, “auto” for the box’s own size.

Parameters#
geometry#

Geometry

property#

"length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"

Returns#

string | undefined

problem()#

problem(geometry, property): string | undefined

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:143

Why the last commit of property was refused; undefined while it was not.

Parameters#
geometry#

Geometry

property#

"length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"

Returns#

string | undefined

step()#

step(geometry, property, direction, store): string | null

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:200

Commit one step of the property’s STEPS (direction ±1) at once: from the draft when there is one (an empty field counts as 0, a draft that is no number is not stepped), else each container from its own exact value, never from the rounded text the field shows. Returns the notice of what it wrote, if any.

Parameters#
geometry#

Geometry

property#

"length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"

direction#

-1 | 1

store#

Store

Returns#

string | null

type()#

type(geometry, property, text): void

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:168

Keep text as the draft of property; its refusal stays until the next commit.

Parameters#
geometry#

Geometry

property#

"length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"

text#

string

Returns#

void

typeField()#

typeField(owner, field, text): void

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:298

Keep text as the draft of a field; its refusal stays until the next commit.

Parameters#
owner#

FieldOwner

field#

DraftField

text#

string

Returns#

void

typeName()#

typeName(field, text): void

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:242

Keep text as the name’s draft; its refusal stays until the next commit.

Parameters#
field#

NameField

text#

string

Returns#

void

value()#

value(geometry, property): string

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:152

What a field shows: its draft, else the value every edited container shares (stated, else drawn, the live one during a gesture), rounded to two decimals; empty while the containers’ values differ.

Parameters#
geometry#

Geometry

property#

"length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"

Returns#

string

Interfaces#

FieldOwner#

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:67

What a field’s draft belongs to: an address in the manifest they were typed against.

Properties#

address#

readonly address: Address

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:68

manifest#

readonly manifest: Manifest

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:69

Type Aliases#

DraftField#

DraftField = ElisionField | "proportion" | "name"

Defined in: editor/src/inspector/propertyDrafts.svelte.ts:64

A field of one element at an address: a selected elision’s, a root’s Proportion, a region’s name.