diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-02 16:18:57 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-02 16:18:57 -0400 |
commit | 2f57ee9ab0fef36f3701317bde03b0dd15158244 (patch) | |
tree | d2da85eec5874787ddd529401074b4ebd50fa350 /www/js | |
parent | 59bbb0ebd81a256f59d53418a76d4105c51bb84f (diff) | |
download | html5ks-2f57ee9ab0fef36f3701317bde03b0dd15158244.tar.xz html5ks-2f57ee9ab0fef36f3701317bde03b0dd15158244.zip |
add centered command
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/api.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/www/js/api.js b/www/js/api.js index 320845a..957bcf0 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -155,8 +155,7 @@ window.html5ks.api = { } deferred.resolve(action); return deferred.promise; - }, - + }, // NOT iscene scene: function (type, name) { var deferred = when.defer(), @@ -344,6 +343,17 @@ window.html5ks.api = { return deferred.promise; }, + centered: function (text) { + var deferred = when.defer(), + centered = document.getElementById("centered"); + centered.innerHTML = this.tag(text); + html5ks.next = function () { + centered.innerHTML = ""; + deferred.resolve(); + }; + return deferred.promise; + }, + menu: function (char, str, choices) { var deferred = when.defer(); this.character(char, str).then(function () { |