mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
29cd0d80f3 | |||
d3f5a41c0d | |||
3f181c6248 |
@ -3,7 +3,7 @@
|
|||||||
"name": "piskel",
|
"name": "piskel",
|
||||||
"main": "./dest/index.html",
|
"main": "./dest/index.html",
|
||||||
"description": "Web based 2d animations editor",
|
"description": "Web based 2d animations editor",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"homepage": "http://github.com/juliandescottes/piskel",
|
"homepage": "http://github.com/juliandescottes/piskel",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
-o-transition: all 500ms ease-out;
|
-o-transition: all 500ms ease-out;
|
||||||
transition: all 500ms ease-out;
|
transition: all 500ms ease-out;
|
||||||
|
|
||||||
background-image: linear-gradient(45deg, rgba(0,0,0, 0.8) 25%, transparent 25%, transparent 75%, rgba(0,0,0, 0.8) 75%, rgba(0,0,0, 0.8)),
|
background-image: linear-gradient(45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D),
|
||||||
linear-gradient(-45deg, rgba(0,0,0, 0.8) 25%, transparent 25%, transparent 75%, rgba(0,0,0, 0.8) 75%, rgba(0,0,0, 0.8));
|
linear-gradient(-45deg, #1D1D1D 20%, transparent 25%, transparent 75%, #1D1D1D 80%, #1D1D1D);
|
||||||
background-size: 29px 45px;
|
background-size: 29px 45px;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
background-position-x: 3px;
|
background-position-x: 3px;
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
ns.PopupPreviewController.prototype.open = function () {
|
ns.PopupPreviewController.prototype.open = function () {
|
||||||
if (!this.isOpen()) {
|
if (!this.isOpen()) {
|
||||||
this.popup = window.open('about:blank', '', 'width=320,height=320');
|
this.popup = window.open('about:blank', '', 'width=320,height=320');
|
||||||
this.popup.document.body.innerHTML = pskl.utils.Template.get('popup-preview-partial');
|
|
||||||
window.setTimeout(this.onPopupLoaded.bind(this), 500);
|
window.setTimeout(this.onPopupLoaded.bind(this), 500);
|
||||||
} else {
|
} else {
|
||||||
this.popup.focus();
|
this.popup.focus();
|
||||||
@ -30,6 +29,7 @@
|
|||||||
|
|
||||||
ns.PopupPreviewController.prototype.onPopupLoaded = function () {
|
ns.PopupPreviewController.prototype.onPopupLoaded = function () {
|
||||||
this.popup.document.title = POPUP_TITLE;
|
this.popup.document.title = POPUP_TITLE;
|
||||||
|
this.popup.document.body.innerHTML = pskl.utils.Template.get('popup-preview-partial');
|
||||||
pskl.utils.Event.addEventListener(this.popup, 'resize', this.onWindowResize_, this);
|
pskl.utils.Event.addEventListener(this.popup, 'resize', this.onWindowResize_, this);
|
||||||
pskl.utils.Event.addEventListener(this.popup, 'unload', this.onPopupClosed_, this);
|
pskl.utils.Event.addEventListener(this.popup, 'unload', this.onPopupClosed_, this);
|
||||||
var container = this.popup.document.querySelector('.preview-container');
|
var container = this.popup.document.querySelector('.preview-container');
|
||||||
|
File diff suppressed because one or more lines are too long
@ -14,7 +14,7 @@
|
|||||||
var color = {
|
var color = {
|
||||||
r : 255,
|
r : 255,
|
||||||
g : 255,
|
g : 255,
|
||||||
b : 255
|
b : 0
|
||||||
};
|
};
|
||||||
var match = null;
|
var match = null;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -5,25 +5,25 @@ describe("Color utils", function() {
|
|||||||
|
|
||||||
it("returns a color when provided with array of colors", function() {
|
it("returns a color when provided with array of colors", function() {
|
||||||
// when/then
|
// when/then
|
||||||
var unusedColor = pskl.utils.ColorUtils.getUnusedColor(['#ffffff', '#feffff', '#fdffff']);
|
var unusedColor = pskl.utils.ColorUtils.getUnusedColor(['#ffff00', '#feff00', '#fdff00']);
|
||||||
// verify
|
// verify
|
||||||
expect(unusedColor).toBe('#FCFFFF');
|
expect(unusedColor).toBe('#FCFF00');
|
||||||
|
|
||||||
// when/then
|
// when/then
|
||||||
unusedColor = pskl.utils.ColorUtils.getUnusedColor(['#fcffff', '#feffff', '#fdffff']);
|
unusedColor = pskl.utils.ColorUtils.getUnusedColor(['#fcff00', '#feff00', '#fdff00']);
|
||||||
// verify
|
// verify
|
||||||
expect(unusedColor).toBe('#FFFFFF');
|
expect(unusedColor).toBe('#FFFF00');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns a color for an empty array", function() {
|
it("returns a color for an empty array", function() {
|
||||||
// when/then
|
// when/then
|
||||||
var unusedColor = pskl.utils.ColorUtils.getUnusedColor([]);
|
var unusedColor = pskl.utils.ColorUtils.getUnusedColor([]);
|
||||||
// verify
|
// verify
|
||||||
expect(unusedColor).toBe('#FFFFFF');
|
expect(unusedColor).toBe('#FFFF00');
|
||||||
|
|
||||||
// when/then
|
// when/then
|
||||||
unusedColor = pskl.utils.ColorUtils.getUnusedColor();
|
unusedColor = pskl.utils.ColorUtils.getUnusedColor();
|
||||||
// verify
|
// verify
|
||||||
expect(unusedColor).toBe('#FFFFFF');
|
expect(unusedColor).toBe('#FFFF00');
|
||||||
});
|
});
|
||||||
});
|
});
|
Reference in New Issue
Block a user