Skip to content

Commit 850d5a9

Browse files
committed
Small changes to the GUI, disabled the ability to toggle snapMode
1 parent 2c8a53b commit 850d5a9

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ features:
3030

3131
enhancements:
3232
- make line creation algorithm smarter
33+
- disallow placing lines on invisible sections of circles
3334
- make arranging words prettier
3435
- overall tweaks for the generation code, especially sizes

canvasUtils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ $('canvas').mousewheel(function(e, delta, deltaX, deltaY){
7070
})
7171

7272
$(document).on("contextmenu", "canvas", function(e){
73-
snapMode=!snapMode;
7473
return false;
7574
});
7675

gallifreyan.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var allCircles=[],
1010
mainCircles=[],
1111
currentCircle, //points to a mainCircle which contains selectedCircle
1212
selectedCircle=-1, //points to selected circle
13-
snapMode=true;
13+
snapMode=true; //can't be disabled for now
1414

1515
var lines=[],
1616
selectedLine=-1,

gui.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ function Button(x, y, width, text, f){
2929

3030
function createGUI(){
3131
buttons.push(new Button(0, 0, 60, "save", function(){createFinalImage();}));
32-
buttons.push(new Button(60, 0, 30, "+",
32+
buttons.push(new Button(800-170, 0, 110, "line width", function(){}));
33+
buttons.push(new Button(800-60, 0, 30, "+",
3334
function(){lineWidth+=0.5; redraw();}
3435
));
35-
buttons.push(new Button(90, 0, 30, "-",
36+
buttons.push(new Button(800-30, 0, 30, "-",
3637
function(){lineWidth-=0.5;if(lineWidth<0.5)lineWidth=0.5; redraw();}
3738
));
3839
}
@@ -41,7 +42,5 @@ function drawGUI(){
4142
for(var i=0;i<buttons.length;++i){
4243
buttons[i].draw();
4344
}
44-
ctx.fillText("are lines correct?: "+(checkLines()?"yes":"no"),10,canvasSize-60*canvasScale);
45-
ctx.fillText("(left click) edit mode: "+((selectedCircle==-1 && selectedLine==-1)?"no":"yes"),10,canvasSize-35*canvasScale);
46-
ctx.fillText("(right click) will snap according to rules: "+(snapMode?"yes":"no"),10,canvasSize-10*canvasScale);
45+
ctx.fillText("are lines correct?: "+(checkLines()?"yes":"no"),10,canvasSize-10*canvasScale);
4746
}

0 commit comments

Comments
 (0)