Code cleanup + unsued images removal

This commit is contained in:
Vince 2013-06-14 13:17:20 +02:00
parent d489504a88
commit 8cdd554db2
7 changed files with 19 additions and 34 deletions

View File

@ -141,20 +141,20 @@ body {
* User messages * User messages
*/ */
.user-message { .user-message {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 0; bottom: 0;
background-color: #F9EDBE; background-color: #F9EDBE;
padding: 10px 47px; padding: 10px 47px;
border-top-left-radius: 7px; border-top-left-radius: 7px;
color: #222; color: #222;
border: #F0C36D 1px solid; border: #F0C36D 1px solid;
border-right: 0; border-right: 0;
border-bottom: 0; border-bottom: 0;
font-weight: bold; font-weight: bold;
font-size: 13px; font-size: 13px;
z-index: 10000; z-index: 10000;
max-width: 300px; max-width: 300px;
} }
.user-message .close { .user-message .close {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

View File

@ -64,7 +64,6 @@
</div> </div>
<div class='main-column'> <div class='main-column'>
<!-- Drawing area: --> <!-- Drawing area: -->
<div id="drawing-canvas-container" class="drawing-canvas-container canvas-container"> <div id="drawing-canvas-container" class="drawing-canvas-container canvas-container">
<div class="canvas-background"></div> <div class="canvas-background"></div>
@ -82,7 +81,6 @@
<input id="preview-fps" class="range-fps" type="range" min="1" max="24" value="12"/> <input id="preview-fps" class="range-fps" type="range" min="1" max="24" value="12"/>
</div> </div>
</div> </div>
<div class="application-actions"> <div class="application-actions">
<div class="tool-icon save-icon" title="Save to gallery" onclick="piskel.storeSheet()" rel="tooltip" data-placement="bottom" ></div> <div class="tool-icon save-icon" title="Save to gallery" onclick="piskel.storeSheet()" rel="tooltip" data-placement="bottom" ></div>
<div class="tool-icon upload-cloud-icon" title="Upload as an animated GIF" onclick="piskel.uploadAsAnimatedGIF()" rel="tooltip" data-placement="bottom" > <div class="tool-icon upload-cloud-icon" title="Upload as an animated GIF" onclick="piskel.uploadAsAnimatedGIF()" rel="tooltip" data-placement="bottom" >
@ -101,7 +99,7 @@
<script src="js/lib/pubsub.js"></script> <script src="js/lib/pubsub.js"></script>
<script src="js/lib/bootstrap/bootstrap.js"></script> <script src="js/lib/bootstrap/bootstrap.js"></script>
<!-- GIF Encoding DEVICES ! OH YEAY! --> <!-- GIF Encoding libraries -->
<script src="js/lib/gif/GIFEncoder.js"></script> <script src="js/lib/gif/GIFEncoder.js"></script>
<script src="js/lib/gif/b64.js"></script> <script src="js/lib/gif/b64.js"></script>
<script src="js/lib/gif/NeuQuant.js"></script> <script src="js/lib/gif/NeuQuant.js"></script>

View File

@ -77,7 +77,9 @@
ns.DrawingController.prototype.startDPIUpdateTimer_ = function () { ns.DrawingController.prototype.startDPIUpdateTimer_ = function () {
if (this.dpiUpdateTimer) window.clearInterval(this.dpiUpdateTimer); if (this.dpiUpdateTimer) {
window.clearInterval(this.dpiUpdateTimer);
}
this.dpiUpdateTimer = window.setTimeout($.proxy(this.updateDPI_, this), 200); this.dpiUpdateTimer = window.setTimeout($.proxy(this.updateDPI_, this), 200);
}, },
@ -258,25 +260,10 @@
leftSectionWidth = $('.left-column').width(), leftSectionWidth = $('.left-column').width(),
rightSectionWidth = $('.right-column').width(), rightSectionWidth = $('.right-column').width(),
availableViewportWidth = $('body').width() - leftSectionWidth - rightSectionWidth, availableViewportWidth = $('body').width() - leftSectionWidth - rightSectionWidth,
//previewHeight = $(".preview-container").height(),
//previewWidth = $(".preview-container").width(),
framePixelHeight = this.framesheet.getCurrentFrame().getHeight(), framePixelHeight = this.framesheet.getCurrentFrame().getHeight(),
framePixelWidth = this.framesheet.getCurrentFrame().getWidth(); framePixelWidth = this.framesheet.getCurrentFrame().getWidth();
var dpi = pskl.PixelUtils.calculateDPI(availableViewportHeight, availableViewportWidth, framePixelHeight, framePixelWidth); var dpi = pskl.PixelUtils.calculateDPI(availableViewportHeight, availableViewportWidth, framePixelHeight, framePixelWidth);
/*
var drawingCanvasHeight = dpi * framePixelHeight;
var drawingCanvasWidth = dpi * framePixelWidth;
*/
// Check if preview and drawing canvas overlap
/*
var heightGap = drawingCanvasHeight + previewHeight - availableViewportHeight,
widthGap = drawingCanvasWidth + previewWidth - availableViewportWidth;
if (heightGap > 0 && widthGap > 0) {
// Calculate the DPI change needed to bridge height and width gap
var gapDPI = pskl.PixelUtils.calculateDPI(heightGap, widthGap, framePixelHeight, framePixelWidth);
// substract gap dpi to initial dpi
dpi -= (gapDPI + 1);
}*/
return dpi; return dpi;
}; };