Fixed resize bug
This commit is contained in:
parent
aa396c8324
commit
fc59101bf5
28
index.html
28
index.html
|
@ -17,6 +17,16 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
#dialog {
|
||||
transition: height 1.5s;
|
||||
height: 0px;
|
||||
background: #DDD;
|
||||
}
|
||||
|
||||
#dialog.expanded {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
|
@ -24,6 +34,10 @@ button {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
button.active {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#ascii-canvas {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
|
@ -34,11 +48,15 @@ button {
|
|||
</head>
|
||||
<body>
|
||||
<div id="menu">
|
||||
<button id="box-button">Box</button>
|
||||
<button id="line-button">Line</button>
|
||||
<button id="freeform-button">Draw</button>
|
||||
<button id="erase-button">Erase</button>
|
||||
<button id="move-button">Resize</button>
|
||||
<div id="buttons">
|
||||
<button id="box-button">Box</button>
|
||||
<button id="line-button">Line</button>
|
||||
<button id="freeform-button">Draw</button>
|
||||
<button id="erase-button">Erase</button>
|
||||
<button id="move-button">Resize</button>
|
||||
<button id="menu-button">Menu</button>
|
||||
</div>
|
||||
<div id="dialog"></div>
|
||||
</div>
|
||||
<canvas id="ascii-canvas"></canvas>
|
||||
<script src="jquery-1.9.1.min.js"></script>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/**
|
||||
* Common classes.
|
||||
*/
|
||||
goog.provide('ascii.Vector');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
/**
|
||||
* Handles user input events and modifies state.
|
||||
*/
|
||||
goog.provide('ascii.Controller');
|
||||
|
||||
goog.require('ascii.StateController');
|
||||
goog.require('ascii.Vector');
|
||||
goog.require('ascii.View');
|
||||
|
||||
/** @const */ var DRAG_LATENCY = 130; // Milliseconds.
|
||||
/** @const */ var DRAG_ACCURACY = 3; // Pixels.
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
/**
|
||||
* Application main entry point.
|
||||
*/
|
||||
goog.provide('ascii.launch');
|
||||
|
||||
goog.require('ascii.Controller');
|
||||
goog.require('ascii.State');
|
||||
goog.require('ascii.View');
|
||||
|
||||
/**
|
||||
* Runs the application.
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
goog.provide('ascii.StateController');
|
||||
|
||||
goog.require('ascii.Vector');
|
||||
|
||||
/**
|
||||
* Draws a line.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
goog.provide('ascii.State');
|
||||
|
||||
/** @const */ var MAX_GRID_SIZE = 1000;
|
||||
/** @const */ var SPECIAL_VALUE = '+';
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
goog.provide('ascii.View');
|
||||
|
||||
goog.require('ascii.Vector');
|
||||
|
||||
/** @const */ var CHARACTER_PIXELS = 15;
|
||||
/** @const */ var RENDER_PADDING = 70;
|
||||
|
||||
|
|
Loading…
Reference in New Issue