Skip to content

Commit

Permalink
fix header button
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Mar 2, 2015
1 parent 1434cdb commit fdf5288
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ plugins/
*.keystore
*.apk
icon*x*.png
build_release.sh
build_release.sh
hooks
6 changes: 3 additions & 3 deletions www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
return {
restrict: 'E',
scope: {
mapData: '='
mapData: '=mapData'
},
template: '<canvas></canvas>',
link: function(scope, element, attrs) {
Expand Down Expand Up @@ -151,15 +151,15 @@
canvas.width = scope.canvasContainer.parentElement.offsetWidth;
canvas.height = scope.canvasContainer.parentElement.offsetHeight;
Catan.UI.LowDefinition.drawMap(mapData.map, canvas);
mapData.thumbnailImageUri = Catan.UI.LowDefinition.getBase64String(canvas);
scope.mapData.thumbnailImageUri = Catan.UI.LowDefinition.getBase64String(canvas);
} else if (assetLoaded) {
Catan.UI.HighDefinition.draw(
renderer,
mapData.map,
scope.canvasContainer.parentElement.offsetWidth,
scope.canvasContainer.parentElement.offsetHeight
);
mapData.map.thumbnailImageUri = Catan.UI.HighDefinition.getBase64String(renderer);
scope.mapData.thumbnailImageUri = Catan.UI.HighDefinition.getBase64String(renderer);
}
});
}
Expand Down
8 changes: 4 additions & 4 deletions www/templates/tab-map.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<ion-view view-title="{{mapData.name && mapData.name || 'Map Generator'}}" ng-init="init()">
<ion-nav-buttons side="secondary">
<button ng-if="mapData.map && starred" class="button button-icon icon ion-checkmark">
</button>
<button ng-if="mapData.map && !starred" class="button button-icon icon ion-star" ng-click="star()">
<button ng-if="mapData.map"
class="button button-icon icon-right icon"
ng-class="{'ion-checkmark': starred, 'ion-star': !starred}" ng-click="star()">
</button>
</ion-nav-buttons>
<ion-content class="padding" scroll="false">
Expand All @@ -12,7 +12,7 @@
</ion-content>
<ion-footer-bar>
<div class="button-bar">
<button ng-click="generate()" class="button button-dark button-clear icon-right ion-shuffle">
<button ng-click="generate()" class="button button-dark button-clear icon icon-right ion-shuffle">
Generate !
</button>
</div>
Expand Down

0 comments on commit fdf5288

Please sign in to comment.