nicer colors. Crisp rendering
							parent
							
								
									6eba55c5c9
								
							
						
					
					
						commit
						70d0828125
					
				|  | @ -4,14 +4,13 @@ export class CanvasHandler { | |||
| 
 | ||||
| 	constructor(currentImageDiv: HTMLElement) { | ||||
| 		this.currentImageDiv = currentImageDiv; | ||||
| 	} | ||||
| 
 | ||||
| 	public Load() { | ||||
| 		this.currentImageDiv.addEventListener('onmousedown', this.clickOnImage); | ||||
| 		this.currentImageDiv.addEventListener('onmouseover', this.hoverOverImage); | ||||
| 	} | ||||
| 
 | ||||
| 	// public Load() {
 | ||||
| 	// 	this.currentImageDiv.addEventListener('onmousedown', this.clickOnImage);
 | ||||
| 	// }
 | ||||
| 
 | ||||
| 	private hoverOverImage() { | ||||
| 		console.log('hovering over image'); | ||||
| 	} | ||||
|  |  | |||
|  | @ -1,30 +1,32 @@ | |||
| div { | ||||
| 	display: block; | ||||
| 	color: blue; | ||||
| 	color: #101e24; | ||||
| 	font-family: "Arial", Helvetica, sans-serif; | ||||
| } | ||||
| 
 | ||||
| #instructions { | ||||
| 	font-size: 12px; | ||||
| 	margin: auto; | ||||
| 	width: 50%; | ||||
| 	border: 1px solid blue; | ||||
| 	padding: 16px; | ||||
| 	border: 2px solid #6b7578; | ||||
| 	padding: 1px; | ||||
| 	text-align: center; | ||||
| } | ||||
| 
 | ||||
| .instruction { | ||||
| 	display: block; | ||||
| 	color: blue; | ||||
| 	color: #101e24; | ||||
| 	font-family: "Arial", Helvetica, sans-serif; | ||||
| } | ||||
| 
 | ||||
| .warning { | ||||
| 	display: block; | ||||
| 	color: red; | ||||
| 	color: #520012; | ||||
| 	font-family: "Arial", Helvetica, sans-serif; | ||||
| } | ||||
| 
 | ||||
| main { | ||||
| 	width: 500px; | ||||
| body { | ||||
| 	background-color: #818485; | ||||
| } | ||||
| 
 | ||||
| #dropZone { | ||||
|  | @ -33,11 +35,23 @@ main { | |||
| } | ||||
| 
 | ||||
| #currentImage { | ||||
| 	width: 400px; | ||||
| 	height: 400px; | ||||
| 	width: 50%; | ||||
| 	height: 50%; | ||||
| 	-ms-interpolation-mode: nearest-neighbor; | ||||
| 	image-rendering: pixelated; | ||||
| } | ||||
| 
 | ||||
| #currentImage img { | ||||
| 	max-width: 100%; | ||||
| 	height: auto; | ||||
| 	object-position: center top; | ||||
| 	width: 256; | ||||
| 	height: 256; | ||||
| 	min-width: 256; | ||||
| 	min-height: 256; | ||||
| 	-ms-interpolation-mode: nearest-neighbor; | ||||
| 	image-rendering: pixelated; | ||||
| 	image-rendering: -moz-crisp-edges; /* Firefox */ | ||||
| 	image-rendering: -o-crisp-edges; /* Opera */ | ||||
| 	image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */ | ||||
| 	image-rendering: crisp-edges; | ||||
| 	-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */ | ||||
| } | ||||
|  |  | |||
|  | @ -9,6 +9,9 @@ | |||
| 	<body> | ||||
| 
 | ||||
|         <div id="dropZone"> | ||||
|           <div id="instructions" class="instruction"> | ||||
|             <p>Drag images onto the page to upload them. Advance frames with arrow keys</p> | ||||
|           </div> | ||||
|           <div id="output"></div> | ||||
| 
 | ||||
|           <div id="frameNumber" class="warning"> | ||||
|  | @ -19,9 +22,6 @@ | |||
|             <img alt=""> | ||||
|           </div> | ||||
|            | ||||
|           <div id="instructions" class="instruction"> | ||||
|             <p>Drag images onto the page to upload them. Advance frames with arrow keys</p> | ||||
|           </div> | ||||
|         </div> | ||||
| 
 | ||||
|         <script src="bundle.js"></script> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue