Merge branch 'AlexHolly-gruntfile'
This commit is contained in:
commit
107751b7eb
2 changed files with 8 additions and 10 deletions
|
@ -1,4 +1,5 @@
|
|||
module.exports = function(grunt) {
|
||||
var ip = 'localhost';
|
||||
var dateFormat = require('dateformat');
|
||||
var now = new Date();
|
||||
var version = '-' + dateFormat(now, "yyyy-mm-dd-hh-MM");
|
||||
|
@ -34,7 +35,7 @@ module.exports = function(grunt) {
|
|||
filesSrc : tests,
|
||||
options : {
|
||||
args : {
|
||||
baseUrl : 'http://localhost:' + '<%= express.test.options.port %>/',
|
||||
baseUrl : 'http://' + ip + ':' + '<%= express.test.options.port %>/',
|
||||
mode : '?debug',
|
||||
delay : conf.delay
|
||||
},
|
||||
|
@ -58,7 +59,7 @@ module.exports = function(grunt) {
|
|||
return {
|
||||
options: {
|
||||
port: port,
|
||||
hostname : host || 'localhost',
|
||||
hostname : host || ip,
|
||||
bases: bases
|
||||
}
|
||||
};
|
||||
|
@ -111,10 +112,10 @@ module.exports = function(grunt) {
|
|||
},
|
||||
open : {
|
||||
regular : {
|
||||
path : 'http://localhost:9001/'
|
||||
path : 'http://' + ip + ':9001/'
|
||||
},
|
||||
debug : {
|
||||
path : 'http://localhost:9901/?debug'
|
||||
path : 'http://' + ip + ':9901/?debug'
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -142,8 +142,7 @@
|
|||
$.publish(Events.MOUSE_EVENT, [event, this]);
|
||||
var frame = this.piskelController.getCurrentFrame();
|
||||
var coords = this.getSpriteCoordinates(event.clientX, event.clientY);
|
||||
if (typeof event.changedTouches != 'undefined' &&
|
||||
typeof event.changedTouches[0] != 'undefined') {
|
||||
if (event.changedTouches && event.changedTouches[0]) {
|
||||
coords = this.getSpriteCoordinates(event.changedTouches[0].clientX, event.changedTouches[0].clientY);
|
||||
}
|
||||
|
||||
|
@ -170,8 +169,7 @@
|
|||
ns.DrawingController.prototype.onMousemove_ = function (event) {
|
||||
this._clientX = event.clientX;
|
||||
this._clientY = event.clientY;
|
||||
if (typeof event.changedTouches != 'undefined' &&
|
||||
typeof event.changedTouches[0] != 'undefined') {
|
||||
if (event.changedTouches && event.changedTouches[0]) {
|
||||
this._clientX = event.changedTouches[0].clientX;
|
||||
this._clientY = event.changedTouches[0].clientY;
|
||||
}
|
||||
|
@ -263,8 +261,7 @@
|
|||
ns.DrawingController.prototype.onMouseup_ = function (event) {
|
||||
var frame = this.piskelController.getCurrentFrame();
|
||||
var coords = this.getSpriteCoordinates(event.clientX, event.clientY);
|
||||
if (typeof event.changedTouches != 'undefined' &&
|
||||
typeof event.changedTouches[0] != 'undefined') {
|
||||
if (event.changedTouches && event.changedTouches[0]) {
|
||||
coords = this.getSpriteCoordinates(event.changedTouches[0].clientX, event.changedTouches[0].clientY);
|
||||
}
|
||||
if (this.isClicked) {
|
||||
|
|
Loading…
Reference in a new issue