mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Merge branch 'gh-pages' into add-fpspersistence
This commit is contained in:
commit
0df366157f
39
all.html
Normal file
39
all.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!doctype html5>
|
||||
<html>
|
||||
<head>
|
||||
<title>All piskels</title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
var loadAllPiskelIds = function (frameId) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
// TODO: Change frameId to framesheetId on the backend
|
||||
xhr.open('GET', 'http://2.piskel-app.appspot.com/all?l=' + frameId, true);
|
||||
xhr.responseType = 'text';
|
||||
|
||||
xhr.onload = function(e) {
|
||||
var ul = document.createElement("UL");
|
||||
var innerHTML = "";
|
||||
eval("var responseObject = " + this.responseText);
|
||||
var keys = responseObject.keys;
|
||||
var baseUrl = window.location.origin + "/piskel/?frameId=";
|
||||
if (keys) {
|
||||
for (var i = 0 ; i < keys.length ; i++) {
|
||||
var key = keys[i];
|
||||
|
||||
innerHTML += "<li><a target='_blank' href='"+baseUrl+key+"'>"+key+"</a></li>"
|
||||
}
|
||||
}
|
||||
ul.innerHTML = innerHTML;
|
||||
document.body.appendChild(ul);
|
||||
};
|
||||
|
||||
xhr.send();
|
||||
};
|
||||
|
||||
loadAllPiskelIds();
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -2,7 +2,7 @@
|
||||
var ns = $.namespace("pskl.model");
|
||||
|
||||
ns.Frame = function (pixels) {
|
||||
this.pixels = this.clonePixels_(pixels);
|
||||
this.pixels = pixels;
|
||||
this.previousStates = [this.getPixels()];
|
||||
this.stateIndex = 0;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user