const class dom::Pos
sys::Obj dom::Pos
@Js
@Serializable { simple=true }
Pos represents a coordinate.
- defVal
-
const static Pos defVal := Pos.<ctor>(0, 0)
Default instance is 0, 0.
- equals
-
virtual override Bool equals(Obj? obj)
Return if obj is same Pos value.
- fromStr
-
static new fromStr(Str s, Bool checked := true)
Parse from string. If invalid and checked is true then throw ParseErr otherwise return null.
- hash
-
virtual override Int hash()
Return hash of x and y.
- make
-
Construct with x, y.
- rel
-
Assuming a page position, return position relative to the given
Elem
. - toStr
-
virtual override Str toStr()
Return
"x,y"
- translate
-
Return
x+tx, y+ty
- translatePos
-
Return
x+tx, y+ty
- x
-
const Int x
X coordinate
- y
-
const Int y
Y coordinate