scroll to top when selecting an object
This commit is contained in:
parent
38f86896f9
commit
ed829a3c43
1 changed files with 7 additions and 1 deletions
|
@ -21,9 +21,11 @@
|
||||||
<Tips>
|
<Tips>
|
||||||
<li>Edit planets by clicking directly inside the graphic or in the table below.</li>
|
<li>Edit planets by clicking directly inside the graphic or in the table below.</li>
|
||||||
<li>Drag planets around to change their distance.</li>
|
<li>Drag planets around to change their distance.</li>
|
||||||
<li>Use the scrollwheel to change their size.</li>
|
<li>Use the scrollwheel to change their size (click first to activate).</li>
|
||||||
<li>To change satellites, click their respective buttons in the planet dialog.</li>
|
<li>To change satellites, click their respective buttons in the planet dialog.</li>
|
||||||
<li>You can also drag satellite buttons around to reorder them.</li>
|
<li>You can also drag satellite buttons around to reorder them.</li>
|
||||||
|
<li>The last removed object can be restored from the table.</li>
|
||||||
|
<li><strong>ONLY THE LAST</strong> removed object can be restored.</li>
|
||||||
</Tips>
|
</Tips>
|
||||||
<SystemSettings v-model:designation="star.designation" v-model:radius="star.radius" />
|
<SystemSettings v-model:designation="star.designation" v-model:radius="star.radius" />
|
||||||
<ObjectList v-bind="{ objects, deletedObject, editObject, deleteObject, restoreDeleted }" />
|
<ObjectList v-bind="{ objects, deletedObject, editObject, deleteObject, restoreDeleted }" />
|
||||||
|
@ -54,6 +56,10 @@ const selectedObject = ref(null)
|
||||||
const deletedObject = ref(null) // { index: Number, object: Object }
|
const deletedObject = ref(null) // { index: Number, object: Object }
|
||||||
|
|
||||||
function editObject (object) {
|
function editObject (object) {
|
||||||
|
if (object) {
|
||||||
|
document.documentElement.scrollTop = 0
|
||||||
|
document.body.scrollTop = 0
|
||||||
|
}
|
||||||
selectedObject.value = object
|
selectedObject.value = object
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue