Skip to content

Commit

Permalink
Adjust click cirlce radius for editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
edloper committed Dec 8, 2024
1 parent 7ce0f0d commit 8bb7c6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion javascript/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class LevelEditor {
this.backgroundColor = '#eee'
this.draw.css({background: this.backgroundColor, border: '1px solid black'});
this.draw.node.classList.add("graph");
this.graph = new Graph(this.draw);
this.graph = new Graph(this.draw, {clickCircleRadius: 12} );
this.selection = [] // up to 0-3 dots.
this.mouseHandler = new MouseHandler(this);
this.image = null;
Expand Down
4 changes: 2 additions & 2 deletions javascript/graph.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

class Graph {
constructor(draw) {
constructor(draw, options) {
this.draw = draw;
this.dots = []
this.tris = []
this.edges = [];
this.alpha = 0.5;
this.clickCircleRadius = 20;
this.clickCircleRadius = options.clickCircleRadius ?? 20;

// Place each object type before its layerMarker in the stacking order.
this.layerMarkers = {
Expand Down

0 comments on commit 8bb7c6b

Please sign in to comment.