Skip to content

Commit

Permalink
[NONE] Initially show contents in MouseDragSnippet.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwienand committed Sep 13, 2017
1 parent 01a8cee commit 30d308a
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ public Scene createScene() {
scene.widthProperty().addListener(sceneSizeChanged);
scene.heightProperty().addListener(sceneSizeChanged);
scene.addEventFilter(MouseEvent.ANY, mouseFilter);

// initially show contents
onSceneSizeChange(scene.getWidth(), scene.getHeight());

return scene;
}

Expand Down Expand Up @@ -150,7 +154,8 @@ protected void onMouseEvent(MouseEvent event) {
pressed.setEffect(null);
IAnchor ifxAnchor = anchors.get(pressed);
if (ifxAnchor != null) {
Set<AnchorKey> keys = ifxAnchor.positionsUnmodifiableProperty().keySet();
Set<AnchorKey> keys = ifxAnchor.positionsUnmodifiableProperty()
.keySet();
for (AnchorKey key : keys) {
key.getAnchored().setEffect(new BoxBlur());
}
Expand Down Expand Up @@ -182,7 +187,8 @@ protected void onMousePress(MouseEvent event) {
pressed.setEffect(new Bloom(0));
IAnchor ifxAnchor = anchors.get(pressed);
if (ifxAnchor != null) {
Set<AnchorKey> keys = ifxAnchor.positionsUnmodifiableProperty().keySet();
Set<AnchorKey> keys = ifxAnchor.positionsUnmodifiableProperty()
.keySet();
for (AnchorKey key : keys) {
key.getAnchored().setEffect(null);
}
Expand Down

0 comments on commit 30d308a

Please sign in to comment.