这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix state update code #128

@PgBiel

Description

@PgBiel

At get-page-dim-writer, calls to loc.position() - and thus the pos variables - must be made outside the state-name.update(...) call. Therefore, the pos variables must be declared above the .update lines seen below.

place(top + left, locate(loc => {
page-dim-state.update(s => {
if s.top-left != none {
s
} else {
let pos = loc.position()
(top-left: pos, bottom-right: s.bottom-right)
}
})
}))
place(bottom + right, locate(loc => {
page-dim-state.update(s => {
if s.bottom-right != none {
s
} else {
let pos = loc.position()
(top-left: s.top-left, bottom-right: pos)
}
})
}))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions