Skip to content

Commit

Permalink
adapt Stopwatch to async API, correct Papier API call
Browse files Browse the repository at this point in the history
  • Loading branch information
letsfindaway committed Oct 1, 2021
1 parent dc3f0d2 commit 7020919
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions resources/library/applications/Papier.wgt/papier.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ $(document).on('click', '.bouton_commande', function (e) {
var canvas = document.getElementById('feuille');
var adresse=canvas.toDataURL('image/png',0.1); // Compression forte (0.1) car sans compression (1), image générée trop lourde à charger sous windows
// Décallage pour voir toutes les étiquettes
sankore.addObject(adresse,'100%','100%',0,0,true);
sankore.addObject(adresse,0,0,0,0,true);
//~ Description Ajoute l'objet à la scène
//~ Paramètres
//~ [QString] pUrl: the object URL.
Expand Down Expand Up @@ -1075,4 +1075,4 @@ function dessiner(type_papier,zone){
break;

}
}
}
10 changes: 5 additions & 5 deletions resources/library/applications/Stopwatch.wgt/js/ubw-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

function init(){
async function init(){

var tempHours;
var tempMinutes;
var tempSeconds;

if(window.sankore){
tempHours = window.sankore.preference("hours","00");
tempMinutes = window.sankore.preference("minutes","00");
tempSeconds = window.sankore.preference("seconds","00");
tempHours = await window.sankore.async.preference("hours","00");
tempMinutes = await window.sankore.async.preference("minutes","00");
tempSeconds = await window.sankore.async.preference("seconds","00");
} else {
tempHours = "00";
tempMinutes = "00";
Expand Down Expand Up @@ -402,4 +402,4 @@ function init(){
var ad = document.getElementById("audio" + type);
ad.play();
}
}
}

0 comments on commit 7020919

Please sign in to comment.