mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-30 04:00:50 +01:00
hopefully fix click issue
This commit is contained in:
parent
eb79ea0383
commit
0245d80111
@ -135,6 +135,8 @@ public class GExtensionStoreController implements Initializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<? extends ContentItem> currentContentItems; // store so java doesn't garbage collect it!
|
||||||
|
|
||||||
public void setOverview(boolean scrollTop) {
|
public void setOverview(boolean scrollTop) {
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
@ -142,9 +144,10 @@ public class GExtensionStoreController implements Initializable {
|
|||||||
|
|
||||||
Element content_items_container = webView.getEngine().getDocument().getElementById(contentItemsContainer);
|
Element content_items_container = webView.getEngine().getDocument().getElementById(contentItemsContainer);
|
||||||
WebUtils.clearElement(content_items_container);
|
WebUtils.clearElement(content_items_container);
|
||||||
for (int i = 0; i < overview.getAmount(); i++) {
|
|
||||||
ContentItem contentItem = overview.getContentItems().get(i);
|
currentContentItems = overview.getContentItems();
|
||||||
contentItem.addHtml(i, extensionStore);
|
for (int i = 0; i < currentContentItems.size(); i++) {
|
||||||
|
currentContentItems.get(i).addHtml(i, extensionStore);
|
||||||
}
|
}
|
||||||
if (scrollTop) {
|
if (scrollTop) {
|
||||||
webView.getEngine().executeScript("document.getElementById('" + contentItemsContainer + "').scrollTop = 0");
|
webView.getEngine().executeScript("document.getElementById('" + contentItemsContainer + "').scrollTop = 0");
|
||||||
|
Loading…
Reference in New Issue
Block a user