UI cleanup

This commit is contained in:
Vince
2012-09-16 04:33:26 +02:00
parent b761750766
commit cfd5050901
33 changed files with 614 additions and 152 deletions

View File

@@ -88,6 +88,11 @@ $.namespace("pskl");
drawingLoop.addCallback(this.render, this);
drawingLoop.start();
// Init (event-delegated) bootstrap tooltips:
$('body').tooltip({
selector: '[rel=tooltip]'
});
this.connectResizeToDpiUpdate_();
},
@@ -115,7 +120,10 @@ $.namespace("pskl");
* @private
*/
calculateDPIsForDrawingCanvas_ : function() {
var availableViewportHeight = $('.main-panel').height() - 50,
var userMessageGap = 80; // Reserve some height to show the user message at the bottom
var availableViewportHeight = $('.main-panel').height() - userMessageGap,
availableViewportWidth = $('.main-panel').width(),
previewHeight = $(".preview-container").height(),
previewWidth = $(".preview-container").width();