mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
wip: use position: fixed for input/textarea in tableeditor
so it does not increase the cell width and does not change all the table size. Actually, there is still a small size change as we remove the cell content before adding the input/textarea, but more subtle than before
This commit is contained in:
parent
3fb7be28ec
commit
9f04f56c7c
2 changed files with 6 additions and 4 deletions
|
@ -70,9 +70,13 @@
|
||||||
.umap-table-editor .formbox,
|
.umap-table-editor .formbox,
|
||||||
.umap-table-editor input {
|
.umap-table-editor input {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
min-height: initial;
|
||||||
}
|
}
|
||||||
.umap-table-editor input {
|
.umap-table-editor textarea,
|
||||||
|
.umap-table-editor input[type=text] {
|
||||||
border-radius: initial;
|
border-radius: initial;
|
||||||
|
width: initial;
|
||||||
|
position: fixed;
|
||||||
}
|
}
|
||||||
.umap-table-editor th button {
|
.umap-table-editor th button {
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
|
|
|
@ -215,10 +215,8 @@ export default class TableEditor extends WithTemplate {
|
||||||
const tr = event.target.closest('tr')
|
const tr = event.target.closest('tr')
|
||||||
const feature = this.datalayer.getFeatureById(tr.dataset.feature)
|
const feature = this.datalayer.getFeatureById(tr.dataset.feature)
|
||||||
const handler = property === 'description' ? 'Textarea' : 'Input'
|
const handler = property === 'description' ? 'Textarea' : 'Input'
|
||||||
const builder = new U.FormBuilder(feature, [[field, { handler: handler }]], {
|
const builder = new U.FormBuilder(feature, [[field, { handler }]], {
|
||||||
id: `umap-feature-properties_${L.stamp(feature)}`,
|
id: `umap-feature-properties_${L.stamp(feature)}`,
|
||||||
className: 'trow',
|
|
||||||
callback: feature.resetTooltip,
|
|
||||||
})
|
})
|
||||||
cell.innerHTML = ''
|
cell.innerHTML = ''
|
||||||
cell.appendChild(builder.build())
|
cell.appendChild(builder.build())
|
||||||
|
|
Loading…
Reference in a new issue