Fixed resize bug

This commit is contained in:
Lewis Hemens 2014-01-19 13:28:36 +00:00
parent aa396c8324
commit fc59101bf5
7 changed files with 23 additions and 26 deletions

View File

@ -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">
<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>

View File

@ -1,7 +1,6 @@
/**
* Common classes.
*/
goog.provide('ascii.Vector');
/**
* @constructor

View File

@ -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.

View File

@ -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.

View File

@ -1,7 +1,3 @@
goog.provide('ascii.StateController');
goog.require('ascii.Vector');
/**
* Draws a line.
*/

View File

@ -1,5 +1,3 @@
goog.provide('ascii.State');
/** @const */ var MAX_GRID_SIZE = 1000;
/** @const */ var SPECIAL_VALUE = '+';

View File

@ -1,7 +1,3 @@
goog.provide('ascii.View');
goog.require('ascii.Vector');
/** @const */ var CHARACTER_PIXELS = 15;
/** @const */ var RENDER_PADDING = 70;