chore(): change source code console.log to console.debug

This commit is contained in:
Adam Bradley
2016-02-02 16:32:37 -06:00
parent 53532c5280
commit de952e3cbb
5 changed files with 32 additions and 32 deletions

View File

@ -353,7 +353,7 @@ export class InputBase {
* @private
*/
clearTextInput() {
console.log("Should clear input");
console.debug("Should clear input");
}
/**

View File

@ -66,9 +66,9 @@ export class List extends Ion {
*/
ngOnInit() {
if (isDefined(this.virtual)) {
console.log('Content', this.content);
console.log('Virtual?', this.virtual);
console.log('Items?', this.items.length, 'of \'em');
console.debug('Content', this.content);
console.debug('Virtual?', this.virtual);
console.debug('Items?', this.items.length, 'of \'em');
this._initVirtualScrolling();
}
}

View File

@ -44,7 +44,7 @@ export class ListVirtualScroll {
this.virtualHeight = this.list.items.length * this.itemHeight;
this.itemsPerScreen = this.viewportHeight / this.itemHeight;
console.log('VIRTUAL: resize(viewportHeight:', this.viewportHeight,
console.debug('VIRTUAL: resize(viewportHeight:', this.viewportHeight,
'viewportScrollHeight:', this.viewportScrollHeight, 'virtualHeight:', this.virtualHeight,
', itemsPerScreen:', this.itemsPerScreen, ')');
}
@ -78,7 +78,7 @@ export class ListVirtualScroll {
// virtual items we draw
for (let i = topIndex, realIndex = 0; i < bottomIndex && i < items.length; i++, realIndex++) {
item = items[i];
console.log('Drawing item', i, item.title);
console.debug('Drawing item', i, item.title);
shownItemRef = this.shownItems[i];
@ -100,12 +100,12 @@ export class ListVirtualScroll {
while (this.leavingItems.length) {
let itemRef = this.leavingItems.pop();
console.log('Removing item', itemRef.item, itemRef.realIndex);
console.debug('Removing item', itemRef.item, itemRef.realIndex);
this.viewContainer.remove(itemRef.realIndex);
}
console.log('VIRTUAL SCROLL: scroll(scrollTop:', st, 'topIndex:', topIndex, 'bottomIndex:', bottomIndex, ')');
console.log('Container has', this.list.getNativeElement().children.length, 'children');
console.debug('VIRTUAL SCROLL: scroll(scrollTop:', st, 'topIndex:', topIndex, 'bottomIndex:', bottomIndex, ')');
console.debug('Container has', this.list.getNativeElement().children.length, 'children');
}
cellAtIndex(index) {

View File

@ -31,20 +31,20 @@ import {raf, ready, CSS} from '../../util/dom';
* export class MyClass {
* constructor(){}
* doRefresh(refresher) {
* console.log('Refreshing!', refresher);
* console.debug('Refreshing!', refresher);
*
* setTimeout(() => {
* console.log('Pull to refresh complete!', refresher);
* console.debug('Pull to refresh complete!', refresher);
* refresher.complete();
* })
* }
*
* doStarting() {
* console.log('Pull started!');
* console.debug('Pull started!');
* }
*
* doPulling(amt) {
* console.log('You have pulled', amt);
* console.debug('You have pulled', amt);
* }
* }
* ```
@ -441,7 +441,7 @@ export class Refresher {
* @param {Event} e TODO
*/
_handleTouchMove(e) {
//console.log('TOUCHMOVE', e);
//console.debug('TOUCHMOVE', e);
// if multitouch or regular scroll event, get out immediately
if (!this.canOverscroll || e.touches.length > 1) {
@ -513,7 +513,7 @@ export class Refresher {
* @param {Event} e TODO
*/
_handleTouchEnd(e) {
console.log('TOUCHEND', e);
console.debug('TOUCHEND', e);
// if this wasn't an overscroll, get out immediately
if (!this.canOverscroll && !this.isDragging) {
return;
@ -548,6 +548,6 @@ export class Refresher {
* @param {Event} e TODO
*/
_handleScroll(e) {
console.log('SCROLL', e.target.scrollTop);
console.debug('SCROLL', e.target.scrollTop);
}
}

View File

@ -378,12 +378,12 @@ export class Slides extends Ion {
this.zoomGesture.on('pinchstart', (e) => {
last_scale = this.scale;
console.log('Last scale', e.scale);
console.debug('Last scale', e.scale);
});
this.zoomGesture.on('pinch', (e) => {
this.scale = Math.max(1, Math.min(last_scale * e.scale, 10));
console.log('Scaling', this.scale);
console.debug('Scaling', this.scale);
this.zoomElement.style[CSS.transform] = 'scale(' + this.scale + ')'
zoomRect = this.zoomElement.getBoundingClientRect();
@ -424,10 +424,10 @@ export class Slides extends Ion {
* @private
*/
toggleZoom(swiper, e) {
console.log('Try toggle zoom');
console.debug('Try toggle zoom');
if (!this.enableZoom) { return; }
console.log('Toggling zoom', e);
console.debug('Toggling zoom', e);
/*
let x = e.pointers[0].clientX;
@ -451,7 +451,7 @@ export class Slides extends Ion {
ty = y-my;
}
console.log(y);
console.debug(y);
*/
let zi = new Animation(this.touch.target.children[0])
@ -512,7 +512,7 @@ export class Slides extends Ion {
* @private
*/
onTouchStart(e) {
console.log('Touch start', e);
console.debug('Touch start', e);
//TODO: Support mice as well
@ -532,7 +532,7 @@ export class Slides extends Ion {
zoomableWidth: target.offsetWidth,
zoomableHeight: target.offsetHeight
}
console.log('Target', this.touch.target);
console.debug('Target', this.touch.target);
//TODO: android prevent default
@ -555,25 +555,25 @@ export class Slides extends Ion {
let y1 = Math.min((this.viewportHeight / 2) - zoomableScaledHeight/2, 0)
let y2 = -y1;
console.log('BOUNDS', x1, x2, y1, y2);
console.debug('BOUNDS', x1, x2, y1, y2);
if (this.scale <= 1) {
return;
}
console.log('PAN', e);
console.debug('PAN', e);
// Move image
this.touch.x = this.touch.deltaX + this.touch.lastX;
this.touch.y = this.touch.deltaY + this.touch.lastY;
console.log(this.touch.x, this.touch.y);
console.debug(this.touch.x, this.touch.y);
if (this.touch.x < x1) {
console.log('OUT ON LEFT');
console.debug('OUT ON LEFT');
}
if (this.touch.x > x2 ){
console.log('OUT ON RIGHT');
console.debug('OUT ON RIGHT');
}
if (this.touch.x > this.viewportWidth) {
@ -581,7 +581,7 @@ export class Slides extends Ion {
} else if (-this.touch.x > this.viewportWidth) {
// Too far on the right side, let the event bubble up (to enable slider on edges, for example)
} else {
console.log('TRANSFORM', this.touch.x, this.touch.y, this.touch.target);
console.debug('TRANSFORM', this.touch.x, this.touch.y, this.touch.target);
//this.touch.target.style[CSS.transform] = 'translateX(' + this.touch.x + 'px) translateY(' + this.touch.y + 'px)';
this.touch.target.style[CSS.transform] = 'translateX(' + this.touch.x + 'px) translateY(' + this.touch.y + 'px)';
e.preventDefault();
@ -595,14 +595,14 @@ export class Slides extends Ion {
* @private
*/
onTouchEnd(e) {
console.log('PANEND', e);
console.debug('PANEND', e);
if (this.scale > 1) {
if (Math.abs(this.touch.x) > this.viewportWidth) {
// TODO what is posX?
var posX = posX > 0 ? this.viewportWidth - 1 : -(this.viewportWidth - 1);
console.log('Setting on posx', this.touch.x);
console.debug('Setting on posx', this.touch.x);
}
/*