-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #993 from dbauszus-glx/sync-fields
Sync fields; Geometry edit updates; Boolean Fields
- Loading branch information
Showing
9 changed files
with
293 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
export default entry => { | ||
|
||
const chkbox = mapp.ui.elements.chkbox({ | ||
label: entry.label || entry.title, | ||
checked: entry.value, | ||
disabled: !entry.edit, | ||
onchange: (checked) => { | ||
if (entry.edit) { | ||
|
||
entry.newValue = checked | ||
entry.location.view?.dispatchEvent( | ||
new CustomEvent('valChange', { | ||
detail: entry | ||
})) | ||
return mapp.ui.elements.chkbox({ | ||
label: entry.label || entry.title, | ||
checked: entry.newValue !== undefined ? entry.newValue: entry.value, | ||
disabled: !entry.edit, | ||
onchange: (checked) => { | ||
|
||
} | ||
}) | ||
entry.newValue = checked | ||
entry.location.view?.dispatchEvent( | ||
new CustomEvent('valChange', { | ||
detail: entry | ||
})) | ||
|
||
} | ||
}) | ||
|
||
const node = mapp.utils.html.node`${chkbox}` | ||
} | ||
|
||
return node | ||
const icon = `mask-icon ${entry.value? 'done': 'close'}` | ||
|
||
return mapp.utils.html.node` | ||
<div class="link-with-img"> | ||
<div class=${icon}></div> | ||
<span>${entry.label || entry.field}` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.