Ну, это действительно вопрос javascript. Вы хотите сделать размер сцены таким же, как размер окна. Это работает для меня на моем андроида проекте:
var stage = new Kinetic.Stage({
container: 'container',
width: window.innerWidth,
height: window.innerHeight
});
Edit:
Кроме того, я рекомендую вам добавить JQuery, а поэтому вы можете проверить изменения ориентации, то вы можете сделать что-то вроде:
window.onresize = function(event) { //this function will resize your stage to the size of your window
stage.setWidth(window.innerWidth);
stage.setHeight(window.innerHeight);
stage.draw(); //redraw the stage, not sure if really needed, but good to have.
}
или вы могли бы сделать:
window.onresize = function(event) {
stage.setScale(x,y); //set x, y scale values when the orientation changes
stage.draw(); //redraw the stage, not sure if really needed, but good to have.
}
добавил яваскрипт тега – SoluableNonagon