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#
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#
property#
"length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"
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#
field#
store#
edit#
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#
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#
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#
field#
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#
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#
field#
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#
field#
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#
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#
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#
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#
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#
property#
"length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"
direction#
-1 | 1
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#
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#
field#
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#
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#
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#
readonlyaddress:Address
Defined in: editor/src/inspector/propertyDrafts.svelte.ts:68
manifest#
readonlymanifest: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.