Merge branch 'master' into enhancement-gif-encoding

This commit is contained in:
jdescottes
2014-05-12 00:50:48 +02:00
23 changed files with 219 additions and 99 deletions

View File

@@ -18,6 +18,10 @@
$('#grid-width').val(gridWidth);
$('#grid-width').change(this.onGridWidthChange.bind(this));
var tiledPreview = pskl.UserSettings.get(pskl.UserSettings.TILED_PREVIEW);
$('#tiled-preview').prop('checked', tiledPreview);
$('#tiled-preview').change(this.onTiledPreviewChange.bind(this));
// Handle canvas background changes:
$('#background-picker-wrapper').click(this.onBackgroundClick.bind(this));
};
@@ -27,6 +31,11 @@
pskl.UserSettings.set(pskl.UserSettings.GRID_WIDTH, parseInt(width, 10));
};
ns.ApplicationSettingsController.prototype.onTiledPreviewChange = function (evt) {
var checked = $('#tiled-preview').prop('checked');
pskl.UserSettings.set(pskl.UserSettings.TILED_PREVIEW, checked);
};
ns.ApplicationSettingsController.prototype.onBackgroundClick = function (evt) {
var target = $(evt.target).closest('.background-picker');
if (target.length) {