12 Commits

Author SHA1 Message Date
juliandescottes
a707170fa2 release: update version to v0.10.1 2017-05-08 00:06:14 +02:00
juliandescottes
8c815f320d copy version file to piskel website 2017-05-08 00:06:14 +02:00
juliandescottes
f74b081fad avoid sanitization for cheatsheet keys 2017-05-08 00:06:14 +02:00
juliandescottes
b8fed60fa6 Fix #651 - stop drawing the zoomedout background if unnecessary 2017-05-06 18:47:01 +02:00
Julian Descottes
d841ad10f6 Merge pull request #677 from juliandescottes/dependencies
Dependencies
2017-05-06 18:42:55 +02:00
juliandescottes
f6e16e7b4b chore: update grunt-spritesmith to 6.4.0 2017-05-06 18:31:49 +02:00
juliandescottes
6fb8a6859c chore: update karma-phantomjs-launcher to 1.0.4 2017-05-06 18:30:08 +02:00
juliandescottes
866553b2ca chore: update grunt-contrib-clean & grunt-contrib-uglify 2017-05-06 17:45:42 +02:00
juliandescottes
5aad87471e chore: update jasmine-chore to 2.6.1 2017-05-06 17:42:19 +02:00
juliandescottes
942aacbb94 chore: update fs-extra to 3.0.1 2017-05-06 17:35:40 +02:00
juliandescottes
88da91bde3 chore: remove karma-chrome-launcher (unused) 2017-05-06 17:32:07 +02:00
juliandescottes
ce94dbeeeb chore: update karma to 1.7.0 2017-05-06 16:54:11 +02:00
6 changed files with 39 additions and 18 deletions

View File

@@ -1,8 +1,6 @@
Piskel Piskel
====== ======
[![Greenkeeper badge](https://badges.greenkeeper.io/juliandescottes/piskel.svg)](https://greenkeeper.io/)
[![Travis Status](https://api.travis-ci.org/juliandescottes/piskel.png?branch=master)](https://travis-ci.org/juliandescottes/piskel) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) [![Travis Status](https://api.travis-ci.org/juliandescottes/piskel.png?branch=master)](https://travis-ci.org/juliandescottes/piskel) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
A simple web-based tool for Spriting and Pixel art. A simple web-based tool for Spriting and Pixel art.

View File

@@ -6,6 +6,8 @@ const fse = require('fs-extra');
const PISKEL_PATH = path.resolve(__dirname, '..'); const PISKEL_PATH = path.resolve(__dirname, '..');
const PISKELAPP_PATH = path.resolve(__dirname, '../../piskel-website'); const PISKELAPP_PATH = path.resolve(__dirname, '../../piskel-website');
var pjson = require('../package.json');
// Callbacks sorted by call sequence. // Callbacks sorted by call sequence.
function onCopy(err) { function onCopy(err) {
if (err) { if (err) {
@@ -52,6 +54,17 @@ function onDeleteTempPartial(err) {
} }
console.log('Temporary main partial deleted...'); console.log('Temporary main partial deleted...');
fs.writeFile(path.resolve(PISKELAPP_PATH, "static/editor/VERSION"), pjson.version, onVersionFileCreated);
}
function onVersionFileCreated(err) {
if (err) {
console.error('Failed to create temporary main partial...');
return console.error(err);
}
console.log('Version file created...');
console.log('Finished!'); console.log('Finished!');
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "piskel", "name": "piskel",
"version": "0.10.0", "version": "0.10.1",
"description": "Pixel art editor", "description": "Pixel art editor",
"author": "Julian Descottes <julian.descottes@gmail.com>", "author": "Julian Descottes <julian.descottes@gmail.com>",
"contributors": [ "contributors": [
@@ -29,7 +29,7 @@
"devDependencies": { "devDependencies": {
"dateformat": "2.0.0", "dateformat": "2.0.0",
"fs-extra": "3.0.1", "fs-extra": "3.0.1",
"grunt": "^1.0.1", "grunt": "0.4.5",
"grunt-casperjs": "^2.2.1", "grunt-casperjs": "^2.2.1",
"grunt-contrib-clean": "1.1.0", "grunt-contrib-clean": "1.1.0",
"grunt-contrib-concat": "1.0.1", "grunt-contrib-concat": "1.0.1",
@@ -38,9 +38,9 @@
"grunt-contrib-jshint": "1.1.0", "grunt-contrib-jshint": "1.1.0",
"grunt-contrib-uglify": "2.3.0", "grunt-contrib-uglify": "2.3.0",
"grunt-contrib-watch": "1.0.0", "grunt-contrib-watch": "1.0.0",
"grunt-include-replace": "5.0.0", "grunt-include-replace": "4.0.1",
"grunt-jscs": "3.0.1", "grunt-jscs": "2.8.0",
"grunt-karma": "2.0.0", "grunt-karma": "1.0.0",
"grunt-leading-indent": "0.2.0", "grunt-leading-indent": "0.2.0",
"grunt-nw-builder": "3.1.0", "grunt-nw-builder": "3.1.0",
"grunt-open": "0.2.3", "grunt-open": "0.2.3",
@@ -48,10 +48,9 @@
"grunt-spritesmith": "6.4.0", "grunt-spritesmith": "6.4.0",
"jasmine-core": "2.6.1", "jasmine-core": "2.6.1",
"karma": "1.7.0", "karma": "1.7.0",
"karma-chrome-launcher": "2.1.1",
"karma-jasmine": "1.1.0", "karma-jasmine": "1.1.0",
"karma-phantomjs-launcher": "1.0.4", "karma-phantomjs-launcher": "1.0.4",
"load-grunt-tasks": "3.5.2", "load-grunt-tasks": "3.5.0",
"phantomjs": "2.1.7", "phantomjs": "2.1.7",
"phantomjs-polyfill-object-assign": "0.0.2", "phantomjs-polyfill-object-assign": "0.0.2",
"promise-polyfill": "6.0.2", "promise-polyfill": "6.0.2",

View File

@@ -140,7 +140,8 @@
title : title, title : title,
icon : descriptor.iconClass, icon : descriptor.iconClass,
description : description, description : description,
key : this.formatKey_(shortcut.getDisplayKey()), // Avoid sanitization
'!key!' : this.formatKey_(shortcut.getDisplayKey()),
className : shortcutClasses.join(' ') className : shortcutClasses.join(' ')
}); });

View File

@@ -252,14 +252,24 @@
var displayContext = this.displayCanvas.getContext('2d'); var displayContext = this.displayCanvas.getContext('2d');
displayContext.save(); displayContext.save();
// Draw background var translateX = this.margin.x - this.offset.x * z;
displayContext.fillStyle = Constants.ZOOMED_OUT_BACKGROUND_COLOR; var translateY = this.margin.y - this.offset.y * z;
displayContext.fillRect(0, 0, this.displayCanvas.width - 1, this.displayCanvas.height - 1);
displayContext.translate( var isZoomedOut = translateX > 0 || translateY > 0;
this.margin.x - this.offset.x * z, // Draw the background / zoomed-out color only if needed. Otherwise the clearRect
this.margin.y - this.offset.y * z // happening after that will clear "out of bounds" and seems to be doing nothing
); // on some chromebooks (cf https://github.com/juliandescottes/piskel/issues/651)
if (isZoomedOut) {
// Draw background
displayContext.fillStyle = Constants.ZOOMED_OUT_BACKGROUND_COLOR;
// The -1 on the width and height here is a workaround for a Chrome-only bug
// that was potentially fixed, but is very hardware dependant. Seems to be
// triggered when doing clear rect or fill rect using the full width & height
// of a canvas. (https://bugs.chromium.org/p/chromium/issues/detail?id=469906)
displayContext.fillRect(0, 0, this.displayCanvas.width - 1, this.displayCanvas.height - 1);
}
displayContext.translate(translateX, translateY);
// Scale up to draw the canvas content // Scale up to draw the canvas content
displayContext.scale(z, z); displayContext.scale(z, z);

View File

@@ -43,7 +43,7 @@
<script type="text/template" id="cheatsheet-shortcut-template"> <script type="text/template" id="cheatsheet-shortcut-template">
<li class="cheatsheet-shortcut {{className}}" data-shortcut-id="{{id}}"> <li class="cheatsheet-shortcut {{className}}" data-shortcut-id="{{id}}">
<div class="cheatsheet-icon {{icon}}"></div> <div class="cheatsheet-icon {{icon}}"></div>
<span class="cheatsheet-key" rel="tooltip" data-placement="top" title="{{title}}">{{key}}</span> <span class="cheatsheet-key" rel="tooltip" data-placement="top" title="{{title}}">{{!key!}}</span>
<span class="cheatsheet-description">{{description}}</span> <span class="cheatsheet-description">{{description}}</span>
</li> </li>
</script> </script>