@progress/kendo-angular-scrollview
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("rxjs/symbol/iterator"),require("@angular/common")):"function"==typeof define&&define.amd?define(["@angular/core","rxjs/symbol/iterator","@angular/common"],t):"object"==typeof exports?exports.KendoAngularScrollview=t(require("@angular/core"),require("rxjs/symbol/iterator"),require("@angular/common")):e.KendoAngularScrollview=t(e["@angular/core"],e["rxjs/symbol/iterator"],e["@angular/common"])}(this,function(e,t,n){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var i=n(1);t.ScrollViewComponent=i.ScrollViewComponent;var o=n(12);t.ScrollViewModule=o.ScrollViewModule;var r=n(14);t.ScrollViewPagerComponent=r.ScrollViewPagerComponent;var a=n(15);t.KendoDraggableDirective=a.KendoDraggableDirective},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};n(2),n(6);var r=n(8),a=n(9),s=n(10),l=function(){function e(e,t){var n=this;this.element=e,this.application=t,this.data=[],this.endless=!1,this.animate=!0,this.pageable=!1,this.arrows=!1,this.itemChanged=new r.EventEmitter,this.animationState=null,this.transitionStyle={},this.view=new s.DataCollection(function(){return new s.DataResultIterator(n.data,n.activeIndex,n.endless,n.pageIndex)}),this.isDataSourceEmpty=!1,this._activeIndex=0,this.index=0,this.pageIndex=null,this.transforms=["translateX(-100%)","translateX(0%)","translateX(100%)"]}return Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){this.index=this._activeIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widgetClass",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollViewClass",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostWidth",{get:function(){return this.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostHeight",{get:function(){return this.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabIndex",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ariaLive",{get:function(){return"assertive"},enumerable:!0,configurable:!0}),e.prototype.keyDown=function(e){e.keyCode===a.Keys.LeftArrow&&this.prev(),e.keyCode===a.Keys.RightArrow&&this.next()},e.prototype.ngOnChanges=function(e){this.activeIndex=Math.max(Math.min(this.activeIndex,this.view.total-1),0)},e.prototype.prev=function(){this.navigate(a.Dir.Prev)},e.prototype.next=function(){this.navigate(a.Dir.Next)},e.prototype.transitionEndHandler=function(e){this.animationState=null,"left"!==e.toState&&"right"!==e.toState||(null!==this.pageIndex&&(this.activeIndex=this.pageIndex,this.pageIndex=null),this.activeIndex=this.index,this.itemChanged.emit({index:this.activeIndex,item:this.view[1]}),this.application.tick())},e.prototype.handlePress=function(e){this.initialTouchCoordinate=e.pageX},e.prototype.handleDrag=function(e){var t=e.pageX-this.initialTouchCoordinate;this.animationState||this.isDragForbidden(t)||!this.draggedInsideBounds(t)||(this.transitionStyle={transform:"translateX("+t+"px)"})},e.prototype.handleRelease=function(e){var t=e.pageX-this.initialTouchCoordinate;this.isDragForbidden(t)||(this.draggedEnoughToNavigate(t)?(this.changeIndex(t>0?a.Dir.Prev:a.Dir.Next),this.animate||(this.transitionStyle=null,this.itemChanged.emit({index:this.activeIndex,item:this.view[1]}))):Math.abs(t)>0&&(this.animate?this.animationState="center":this.transitionStyle=null))},e.prototype.pageChange=function(e){this.animationState||this.activeIndex===e||(this.animate?(this.pageIndex=e,this.animationState=this.pageIndex>this.index?"left":"right"):this.activeIndex=e)},e.prototype.inlineStyles=function(e){return{transform:this.transforms[e],width:this.width,height:this.height}},e.prototype.displayPrevArrow=function(){return(this.endless||this.activeIndex>0)&&this.view.total>0},e.prototype.displayNextArrow=function(){return(this.endless||this.activeIndex+1<this.view.total)&&this.view.total>0},e.prototype.draggedInsideBounds=function(e){return Math.abs(e)<=this.element.nativeElement.offsetWidth},e.prototype.draggedEnoughToNavigate=function(e){return Math.abs(e)>this.element.nativeElement.offsetWidth/2},e.prototype.isDragForbidden=function(e){return!this.endless&&(0===this.activeIndex&&e>0||this.activeIndex===this.view.total-1&&e<0)},e.prototype.navigate=function(e){this.isDataSourceEmpty||this.animationState||this.changeIndex(e)},e.prototype.changeIndex=function(e){e===a.Dir.Next&&this.view.canMoveNext()?(this.index=(this.index+1)%this.view.total,this.animate?this.animationState="left":this.activeIndex=this.index):this.view.canMovePrev()&&(this.index=0===this.index?this.view.total-1:this.index-1,this.animate?this.animationState="right":this.activeIndex=this.index)},i([r.Input(),o("design:type",Array)],e.prototype,"data",void 0),i([r.Input(),o("design:type",Number),o("design:paramtypes",[Number])],e.prototype,"activeIndex",null),i([r.Input(),o("design:type",String)],e.prototype,"width",void 0),i([r.Input(),o("design:type",String)],e.prototype,"height",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"endless",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"animate",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"pageable",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"arrows",void 0),i([r.Output(),o("design:type",r.EventEmitter)],e.prototype,"itemChanged",void 0),i([r.ContentChild(r.TemplateRef),o("design:type",r.TemplateRef)],e.prototype,"itemTemplateRef",void 0),i([r.HostBinding("class.k-widget"),o("design:type",Boolean)],e.prototype,"widgetClass",null),i([r.HostBinding("class.k-scrollview-wrap"),o("design:type",Boolean)],e.prototype,"scrollViewClass",null),i([r.HostBinding("style.width"),o("design:type",String)],e.prototype,"hostWidth",null),i([r.HostBinding("style.height"),o("design:type",String)],e.prototype,"hostHeight",null),i([r.HostBinding("attr.tabindex"),o("design:type",Number)],e.prototype,"tabIndex",null),i([r.HostBinding("attr.aria-live"),o("design:type",String)],e.prototype,"ariaLive",null),i([r.HostListener("keydown",["$event"]),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],e.prototype,"keyDown",null),e=i([r.Component({animations:[r.trigger("animateTo",[r.state("center, left, right",r.style({transform:"translateX(0)"})),r.transition("* => right",[r.animate("300ms ease-out",r.style({transform:"translateX(100%)"}))]),r.transition("* => left",[r.animate("300ms ease-out",r.style({transform:"translateX(-100%)"}))]),r.transition("* => center",[r.animate("300ms ease-out")])])],exportAs:"kendoScrollView",selector:"kendo-scrollview",template:'\n <ul class=\'k-scrollview\'\n [ngStyle]="transitionStyle"\n [@animateTo]="animationState"\n (@animateTo.done)= "transitionEndHandler($event)"\n (kendo.drag) = "handleDrag($event)"\n (kendo.press) = "handlePress($event)"\n (kendo.release) = "handleRelease($event)"\n kendoDraggable>\n <li *ngFor="let item of view;let i=index"\n [ngStyle]="inlineStyles(i)"\n [attr.aria-hidden]="i !== 1">\n <template\n [ngTemplateOutlet]="itemTemplateRef"\n [ngOutletContext]="{ item: item }">\n </template>\n </li>\n </ul>\n <div class=\'k-scrollview-elements\'\n [ngStyle]="{\'height\': height}"\n *ngIf="!isDataSourceEmpty && (pageable||arrows)">\n <a class="k-scrollview-prev"\n aria-label="previous"\n *ngIf="arrows && displayPrevArrow()"\n (click)="prev()">\n <span class="k-icon k-i-arrowhead-w"></span>\n </a>\n <a class="k-scrollview-next"\n aria-label="next"\n *ngIf="arrows && displayNextArrow()"\n (click)="next()">\n <span class="k-icon k-i-arrowhead-e"></span>\n </a>\n <kendo-scrollview-pager *ngIf(pageable)\n (pagerIndexChange)="pageChange($event)"\n [data]="data"\n [activeIndex]="activeIndex">\n </kendo-scrollview-pager>\n </div>\n '}),o("design:paramtypes",[r.ElementRef,r.ApplicationRef])],e)}();t.ScrollViewComponent=l},function(e,t){},,,,function(e,t){},,function(t,n){t.exports=e},function(e,t){"use strict";!function(e){e[e.LeftArrow=37]="LeftArrow",e[e.RightArrow=39]="RightArrow"}(t.Keys||(t.Keys={}));t.Keys;!function(e){e[e.Next=1]="Next",e[e.Prev=-1]="Prev"}(t.Dir||(t.Dir={}));t.Dir},function(e,t,n){"use strict";var i=n(11),o=function(){function e(e,t,n,i){this.source=e?e:[],this.index=t?t:0,this.endless=n,this.pageIndex=i}return Object.defineProperty(e.prototype,"data",{get:function(){var e,t=this.total;if(this.endless)e=[this.source[(this.index-1+t)%t],this.source[this.index%t],this.source[(this.index+1+t)%t]];else{var n=[{}].concat(this.source.slice(0),[{}]);e=n.slice(this.index,this.index+3)}if(null!==this.pageIndex){var i=this.pageIndex>this.index;e[i?2:0]=this.source[this.pageIndex]}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this.source.length},enumerable:!0,configurable:!0}),e.prototype.canMoveNext=function(){return this.endless||this.index<this.total-1},e.prototype.canMovePrev=function(){return this.endless||this.index>0},e.prototype[i.$$iterator]=function(){return this.data[i.$$iterator]()},e}();t.DataResultIterator=o;var r=function(){function e(e){this.accessor=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this.accessor().data.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this.accessor().total},enumerable:!0,configurable:!0}),e.prototype.canMoveNext=function(){return this.accessor().canMoveNext()},e.prototype.canMovePrev=function(){return this.accessor().canMovePrev()},e.prototype[i.$$iterator]=function(){return this.accessor()[i.$$iterator]()},e}();t.DataCollection=r},function(e,n){e.exports=t},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(8),a=n(13),s=n(1),l=n(14),c=n(15),u=[s.ScrollViewComponent,l.ScrollViewPagerComponent,c.KendoDraggableDirective],d=[s.ScrollViewComponent],p=function(){function e(){}return e=i([r.NgModule({declarations:[u],exports:[d],imports:[a.CommonModule]}),o("design:paramtypes",[])],e)}();t.ScrollViewModule=p},function(e,t){e.exports=n},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(8),a=n(8),s=function(){function e(){this.pagerIndexChange=new a.EventEmitter}return e.prototype.itemClass=function(e){return{"k-primary":e===this.activeIndex}},e.prototype.indexChange=function(e){this.pagerIndexChange.emit(e)},i([r.Input(),o("design:type",Number)],e.prototype,"activeIndex",void 0),i([r.Input(),o("design:type",Array)],e.prototype,"data",void 0),i([r.Output(),o("design:type",a.EventEmitter)],e.prototype,"pagerIndexChange",void 0),e=i([r.Component({selector:"kendo-scrollview-pager",template:'\n <ul class="k-scrollview-pageable">\n <li class="k-button" *ngFor="let item of data; let i = index"\n [ngClass]="itemClass(i)"\n (click)="indexChange(i)">\n </li>\n </ul>\n '}),o("design:paramtypes",[])],e)}();t.ScrollViewPagerComponent=s},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(8),a=n(16),s=function(){function e(e){var t=this;this.kendo={drag:new r.EventEmitter,press:new r.EventEmitter,release:new r.EventEmitter},this.draggable=new a.default({drag:function(e){e.hasOwnProperty("originalEvent")&&e.originalEvent.preventDefault(),t.kendo.drag.next(e)},press:function(e){return t.kendo.press.next(e)},release:function(e){return t.kendo.release.next(e)}}),this.draggable.bindTo(e.nativeElement)}return e.prototype.ngOnDestroy=function(){this.draggable.destroy()},e=i([r.Directive({outputs:["kendo.press","kendo.drag","kendo.release"],selector:"[kendoDraggable]"}),o("design:paramtypes",[r.ElementRef])],e)}();t.KendoDraggableDirective=s},function(e,t){e.exports=function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return e.type.match(l)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,type:e.type,originalEvent:e}:{pageX:e.pageX,pageY:e.pageY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(e,t){return function(n){return t(e(n))}},a=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},s=function(e,t,n){return e.removeEventListener&&e.removeEventListener(t,n)},l=/touch/,c=function(){},u=2e3,d=function(){function e(t){var o=this,l=t.press,d=void 0===l?c:l,p=t.drag,h=void 0===p?c:p,f=t.release,g=void 0===f?c:f;n(this,e),this._touchstart=function(e){1===e.touches.length&&o._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&o._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(o._releaseHandler(e),o._ignoreMouse=!0,setTimeout(o._restoreMouse,u))},this._restoreMouse=function(){o._ignoreMouse=!1},this._mousedown=function(e){var t=e.which;t&&t>1||o._ignoreMouse||(a(document,"mousemove",o._mousemove),a(document,"mouseup",o._mouseup),o._pressHandler(e))},this._mousemove=function(e){o._dragHandler(e)},this._mouseup=function(e){s(document,"mousemove",o._mousemove),s(document,"mouseup",o._mouseup),o._releaseHandler(e)},this._pressHandler=r(i,d),this._dragHandler=r(i,h),this._releaseHandler=r(i,g),this._ignoreMouse=!1}return o(e,[{key:"bindTo",value:function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,a(e,"mousedown",this._mousedown),a(e,"touchstart",this._touchstart),a(e,"touchmove",this._touchmove),a(e,"touchend",this._touchend))}},{key:"_unbindFromCurrent",value:function(){s(this._element,"mousedown",this._mousedown),s(this._element,"touchstart",this._touchstart),s(this._element,"touchmove",this._touchmove),s(this._element,"touchend",this._touchend)}},{key:"destroy",value:function(){this._unbindFromCurrent(),this._element=null}}]),e}();t.default=d}])}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("rxjs/symbol/iterator"),require("@angular/common")):"function"==typeof define&&define.amd?define(["@angular/core","rxjs/symbol/iterator","@angular/common"],t):"object"==typeof exports?exports.KendoAngularScrollview=t(require("@angular/core"),require("rxjs/symbol/iterator"),require("@angular/common")):e.KendoAngularScrollview=t(e["@angular/core"],e["rxjs/symbol/iterator"],e["@angular/common"])}(this,function(e,t,n){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var i=n(1);t.ScrollViewComponent=i.ScrollViewComponent;var o=n(12);t.ScrollViewModule=o.ScrollViewModule;var r=n(14);t.ScrollViewPagerComponent=r.ScrollViewPagerComponent;var a=n(15);t.KendoDraggableDirective=a.KendoDraggableDirective},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};n(2),n(6);var r=n(8),a=n(9),s=n(10),l=function(){function e(e,t){var n=this;this.element=e,this.application=t,this.data=[],this.endless=!1,this.animate=!0,this.pageable=!1,this.arrows=!1,this.itemChanged=new r.EventEmitter,this.animationState=null,this.transitionStyle={},this.view=new s.DataCollection(function(){return new s.DataResultIterator(n.data,n.activeIndex,n.endless,n.pageIndex)}),this.isDataSourceEmpty=!1,this._activeIndex=0,this.index=0,this.pageIndex=null,this.transforms=["translateX(-100%)","translateX(0%)","translateX(100%)"]}return Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){this.index=this._activeIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widgetClass",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollViewClass",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostWidth",{get:function(){return this.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostHeight",{get:function(){return this.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabIndex",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ariaLive",{get:function(){return"assertive"},enumerable:!0,configurable:!0}),e.prototype.keyDown=function(e){e.keyCode===a.Keys.LeftArrow&&this.prev(),e.keyCode===a.Keys.RightArrow&&this.next()},e.prototype.ngOnChanges=function(e){this.activeIndex=Math.max(Math.min(this.activeIndex,this.view.total-1),0)},e.prototype.prev=function(){this.navigate(a.Dir.Prev)},e.prototype.next=function(){this.navigate(a.Dir.Next)},e.prototype.transitionEndHandler=function(e){this.animationState=null,"left"!==e.toState&&"right"!==e.toState||(null!==this.pageIndex&&(this.activeIndex=this.pageIndex,this.pageIndex=null),this.activeIndex=this.index,this.itemChanged.emit({index:this.activeIndex,item:this.view.item(1)}),this.application.tick())},e.prototype.handlePress=function(e){this.initialTouchCoordinate=e.pageX},e.prototype.handleDrag=function(e){var t=e.pageX-this.initialTouchCoordinate;this.animationState||this.isDragForbidden(t)||!this.draggedInsideBounds(t)||(this.transitionStyle={transform:"translateX("+t+"px)"})},e.prototype.handleRelease=function(e){var t=e.pageX-this.initialTouchCoordinate;this.isDragForbidden(t)||(this.draggedEnoughToNavigate(t)?(this.changeIndex(t>0?a.Dir.Prev:a.Dir.Next),this.animate||(this.transitionStyle=null,this.itemChanged.emit({index:this.activeIndex,item:this.view.item(1)}))):Math.abs(t)>0&&(this.animate?this.animationState="center":this.transitionStyle=null))},e.prototype.pageChange=function(e){this.animationState||this.activeIndex===e||(this.animate?(this.pageIndex=e,this.animationState=this.pageIndex>this.index?"left":"right"):this.activeIndex=e)},e.prototype.inlineStyles=function(e){return{transform:this.transforms[e],width:this.width,height:this.height}},e.prototype.displayPrevArrow=function(){return(this.endless||this.activeIndex>0)&&this.view.total>0},e.prototype.displayNextArrow=function(){return(this.endless||this.activeIndex+1<this.view.total)&&this.view.total>0},e.prototype.draggedInsideBounds=function(e){return Math.abs(e)<=this.element.nativeElement.offsetWidth},e.prototype.draggedEnoughToNavigate=function(e){return Math.abs(e)>this.element.nativeElement.offsetWidth/2},e.prototype.isDragForbidden=function(e){return!this.endless&&(0===this.activeIndex&&e>0||this.activeIndex===this.view.total-1&&e<0)},e.prototype.navigate=function(e){this.isDataSourceEmpty||this.animationState||this.changeIndex(e)},e.prototype.changeIndex=function(e){e===a.Dir.Next&&this.view.canMoveNext()?(this.index=(this.index+1)%this.view.total,this.animate?this.animationState="left":this.activeIndex=this.index):this.view.canMovePrev()&&(this.index=0===this.index?this.view.total-1:this.index-1,this.animate?this.animationState="right":this.activeIndex=this.index)},i([r.Input(),o("design:type",Array)],e.prototype,"data",void 0),i([r.Input(),o("design:type",Number),o("design:paramtypes",[Number])],e.prototype,"activeIndex",null),i([r.Input(),o("design:type",String)],e.prototype,"width",void 0),i([r.Input(),o("design:type",String)],e.prototype,"height",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"endless",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"animate",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"pageable",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"arrows",void 0),i([r.Output(),o("design:type",r.EventEmitter)],e.prototype,"itemChanged",void 0),i([r.ContentChild(r.TemplateRef),o("design:type",r.TemplateRef)],e.prototype,"itemTemplateRef",void 0),i([r.HostBinding("class.k-widget"),o("design:type",Boolean)],e.prototype,"widgetClass",null),i([r.HostBinding("class.k-scrollview-wrap"),o("design:type",Boolean)],e.prototype,"scrollViewClass",null),i([r.HostBinding("style.width"),o("design:type",String)],e.prototype,"hostWidth",null),i([r.HostBinding("style.height"),o("design:type",String)],e.prototype,"hostHeight",null),i([r.HostBinding("attr.tabindex"),o("design:type",Number)],e.prototype,"tabIndex",null),i([r.HostBinding("attr.aria-live"),o("design:type",String)],e.prototype,"ariaLive",null),i([r.HostListener("keydown",["$event"]),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],e.prototype,"keyDown",null),e=i([r.Component({animations:[r.trigger("animateTo",[r.state("center, left, right",r.style({transform:"translateX(0)"})),r.transition("* => right",[r.animate("300ms ease-out",r.style({transform:"translateX(100%)"}))]),r.transition("* => left",[r.animate("300ms ease-out",r.style({transform:"translateX(-100%)"}))]),r.transition("* => center",[r.animate("300ms ease-out")])])],exportAs:"kendoScrollView",selector:"kendo-scrollview",template:'\n <ul class=\'k-scrollview\'\n [ngStyle]="transitionStyle"\n [@animateTo]="animationState"\n (@animateTo.done)= "transitionEndHandler($event)"\n (kendo.drag) = "handleDrag($event)"\n (kendo.press) = "handlePress($event)"\n (kendo.release) = "handleRelease($event)"\n kendoDraggable>\n <li *ngFor="let item of view;let i=index"\n [ngStyle]="inlineStyles(i)"\n [attr.aria-hidden]="i !== 1">\n <template\n [ngTemplateOutlet]="itemTemplateRef"\n [ngOutletContext]="{ item: item }">\n </template>\n </li>\n </ul>\n <div class=\'k-scrollview-elements\'\n [ngStyle]="{\'height\': height}"\n *ngIf="!isDataSourceEmpty && (pageable||arrows)">\n <a class="k-scrollview-prev"\n aria-label="previous"\n *ngIf="arrows && displayPrevArrow()"\n (click)="prev()">\n <span class="k-icon k-i-arrowhead-w"></span>\n </a>\n <a class="k-scrollview-next"\n aria-label="next"\n *ngIf="arrows && displayNextArrow()"\n (click)="next()">\n <span class="k-icon k-i-arrowhead-e"></span>\n </a>\n <kendo-scrollview-pager *ngIf(pageable)\n (pagerIndexChange)="pageChange($event)"\n [data]="data"\n [activeIndex]="activeIndex">\n </kendo-scrollview-pager>\n </div>\n '}),o("design:paramtypes",[r.ElementRef,r.ApplicationRef])],e)}();t.ScrollViewComponent=l},function(e,t){},,,,function(e,t){},,function(t,n){t.exports=e},function(e,t){"use strict";!function(e){e[e.LeftArrow=37]="LeftArrow",e[e.RightArrow=39]="RightArrow"}(t.Keys||(t.Keys={}));t.Keys;!function(e){e[e.Next=1]="Next",e[e.Prev=-1]="Prev"}(t.Dir||(t.Dir={}));t.Dir},function(e,t,n){"use strict";var i=n(11),o=function(){function e(e,t,n,i){this.source=e?e:[],this.index=t?t:0,this.endless=n,this.pageIndex=i}return Object.defineProperty(e.prototype,"data",{get:function(){var e,t=this.total;if(this.endless)e=[this.source[(this.index-1+t)%t],this.source[this.index%t],this.source[(this.index+1+t)%t]];else{var n=[{}].concat(this.source.slice(0),[{}]);e=n.slice(this.index,this.index+3)}if(null!==this.pageIndex){var i=this.pageIndex>this.index;e[i?2:0]=this.source[this.pageIndex]}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this.source.length},enumerable:!0,configurable:!0}),e.prototype.canMoveNext=function(){return this.endless||this.index<this.total-1},e.prototype.canMovePrev=function(){return this.endless||this.index>0},e.prototype[i.$$iterator]=function(){return this.data[i.$$iterator]()},e}();t.DataResultIterator=o;var r=function(){function e(e){this.accessor=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this.accessor().data.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this.accessor().total},enumerable:!0,configurable:!0}),e.prototype.item=function(e){return this.accessor().data[e]},e.prototype.canMoveNext=function(){return this.accessor().canMoveNext()},e.prototype.canMovePrev=function(){return this.accessor().canMovePrev()},e.prototype[i.$$iterator]=function(){return this.accessor()[i.$$iterator]()},e}();t.DataCollection=r},function(e,n){e.exports=t},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(8),a=n(13),s=n(1),l=n(14),c=n(15),u=[s.ScrollViewComponent,l.ScrollViewPagerComponent,c.KendoDraggableDirective],d=[s.ScrollViewComponent],p=function(){function e(){}return e=i([r.NgModule({declarations:[u],exports:[d],imports:[a.CommonModule]}),o("design:paramtypes",[])],e)}();t.ScrollViewModule=p},function(e,t){e.exports=n},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(8),a=n(8),s=function(){function e(){this.pagerIndexChange=new a.EventEmitter}return e.prototype.itemClass=function(e){return{"k-primary":e===this.activeIndex}},e.prototype.indexChange=function(e){this.pagerIndexChange.emit(e)},i([r.Input(),o("design:type",Number)],e.prototype,"activeIndex",void 0),i([r.Input(),o("design:type",Array)],e.prototype,"data",void 0),i([r.Output(),o("design:type",a.EventEmitter)],e.prototype,"pagerIndexChange",void 0),e=i([r.Component({selector:"kendo-scrollview-pager",template:'\n <ul class="k-scrollview-pageable">\n <li class="k-button" *ngFor="let item of data; let i = index"\n [ngClass]="itemClass(i)"\n (click)="indexChange(i)">\n </li>\n </ul>\n '}),o("design:paramtypes",[])],e)}();t.ScrollViewPagerComponent=s},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(8),a=n(16),s=function(){function e(e){var t=this;this.kendo={drag:new r.EventEmitter,press:new r.EventEmitter,release:new r.EventEmitter},this.draggable=new a.default({drag:function(e){e.hasOwnProperty("originalEvent")&&e.originalEvent.preventDefault(),t.kendo.drag.next(e)},press:function(e){return t.kendo.press.next(e)},release:function(e){return t.kendo.release.next(e)}}),this.draggable.bindTo(e.nativeElement)}return e.prototype.ngOnDestroy=function(){this.draggable.destroy()},e=i([r.Directive({outputs:["kendo.press","kendo.drag","kendo.release"],selector:"[kendoDraggable]"}),o("design:paramtypes",[r.ElementRef])],e)}();t.KendoDraggableDirective=s},function(e,t){"use strict";function n(e){return e.type.match(a)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,type:e.type,originalEvent:e}:{pageX:e.pageX,pageY:e.pageY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e,t){return function(n){return t(e(n))}},o=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},r=function(e,t,n){return e.removeEventListener&&e.removeEventListener(t,n)},a=/touch/,s=function(){},l=2e3,c=function(e){var t=this,a=e.press;void 0===a&&(a=s);var c=e.drag;void 0===c&&(c=s);var u=e.release;void 0===u&&(u=s),this._pressHandler=i(n,a),this._dragHandler=i(n,c),this._releaseHandler=i(n,u),this._ignoreMouse=!1,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,l))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(o(document,"mousemove",t._mousemove),o(document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){r(document,"mousemove",t._mousemove),r(document,"mouseup",t._mouseup),t._releaseHandler(e)}};c.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,o(e,"mousedown",this._mousedown),o(e,"touchstart",this._touchstart),o(e,"touchmove",this._touchmove),o(e,"touchend",this._touchend))},c.prototype._unbindFromCurrent=function(){r(this._element,"mousedown",this._mousedown),r(this._element,"touchstart",this._touchstart),r(this._element,"touchmove",this._touchmove),r(this._element,"touchend",this._touchend)},c.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},t.Draggable=c,t.default=c}])}); |
@@ -23,4 +23,5 @@ /** | ||
readonly total: number; | ||
item(index: number): any; | ||
canMoveNext(): boolean; | ||
canMovePrev(): boolean; | ||
} |
@@ -128,2 +128,5 @@ (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap | ||
}); | ||
DataCollection.prototype.item = function (index) { | ||
return this.accessor().data[index]; | ||
}; | ||
DataCollection.prototype.canMoveNext = function () { | ||
@@ -130,0 +133,0 @@ return this.accessor().canMoveNext(); |
@@ -117,222 +117,139 @@ (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap | ||
module.exports = | ||
/******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
'use strict'; | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
var proxy = function (a, b) { return function (e) { return b(a(e)); }; }; | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
var bind = function (el, event, callback) { return el.addEventListener && el.addEventListener(event, callback); }; | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
var unbind = function (el, event, callback) { return el.removeEventListener && el.removeEventListener(event, callback); }; | ||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
var touchRegExp = /touch/; | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
function normalizeEvent(e) { | ||
if (e.type.match(touchRegExp)) { | ||
return { | ||
pageX: e.changedTouches[0].pageX, | ||
pageY: e.changedTouches[0].pageY, | ||
type: e.type, | ||
originalEvent: e | ||
}; | ||
} | ||
return { | ||
pageX: e.pageX, | ||
pageY: e.pageY, | ||
type: e.type, | ||
ctrlKey: e.ctrlKey, | ||
shiftKey: e.shiftKey, | ||
altKey: e.altKey, | ||
originalEvent: e | ||
}; | ||
} | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
var noop = function() { }; | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
// 300ms is the usual mouse interval; | ||
// However, an underpowered mobile device under a heavy load may queue mouse events for a longer period. | ||
var IGNORE_MOUSE_TIMEOUT = 2000; | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
var Draggable = function Draggable(ref) { | ||
var this$1 = this; | ||
var press = ref.press; if ( press === void 0 ) press = noop; | ||
var drag = ref.drag; if ( drag === void 0 ) drag = noop; | ||
var release = ref.release; if ( release === void 0 ) release = noop; | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
this._pressHandler = proxy(normalizeEvent, press); | ||
this._dragHandler = proxy(normalizeEvent, drag); | ||
this._releaseHandler = proxy(normalizeEvent, release); | ||
module.exports = __webpack_require__(1); | ||
this._ignoreMouse = false; | ||
this._touchstart = function (e) { | ||
if (e.touches.length === 1) { | ||
this$1._pressHandler(e); | ||
} | ||
}; | ||
/***/ }, | ||
/* 1 */ | ||
/***/ function(module, exports) { | ||
this._touchmove = function (e) { | ||
if (e.touches.length === 1) { | ||
this$1._dragHandler(e); | ||
} | ||
}; | ||
"use strict"; | ||
this._touchend = function (e) { | ||
// the last finger has been lifted, and the user is not doing gesture. | ||
// there might be a better way to handle this. | ||
if (e.touches.length === 0 && e.changedTouches.length === 1) { | ||
this$1._releaseHandler(e); | ||
this$1._ignoreMouse = true; | ||
setTimeout(this$1._restoreMouse, IGNORE_MOUSE_TIMEOUT); | ||
} | ||
}; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
this._restoreMouse = function () { | ||
this$1._ignoreMouse = false; | ||
}; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
this._mousedown = function (e) { | ||
var which = e.which; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
if ((which && which > 1) || this$1._ignoreMouse) { | ||
return; | ||
} | ||
var proxy = function proxy(a, b) { | ||
return function (e) { | ||
return b(a(e)); | ||
}; | ||
}; | ||
bind(document, "mousemove", this$1._mousemove); | ||
bind(document, "mouseup", this$1._mouseup); | ||
this$1._pressHandler(e); | ||
}; | ||
var bind = function bind(el, event, callback) { | ||
return el.addEventListener && el.addEventListener(event, callback); | ||
}; | ||
this._mousemove = function (e) { | ||
this$1._dragHandler(e); | ||
}; | ||
var unbind = function unbind(el, event, callback) { | ||
return el.removeEventListener && el.removeEventListener(event, callback); | ||
}; | ||
this._mouseup = function (e) { | ||
unbind(document, "mousemove", this$1._mousemove); | ||
unbind(document, "mouseup", this$1._mouseup); | ||
this$1._releaseHandler(e); | ||
}; | ||
}; | ||
var touchRegExp = /touch/; | ||
Draggable.prototype.bindTo = function bindTo (element) { | ||
if (element === this._element) { | ||
return; | ||
} | ||
function normalizeEvent(e) { | ||
if (e.type.match(touchRegExp)) { | ||
return { | ||
pageX: e.changedTouches[0].pageX, | ||
pageY: e.changedTouches[0].pageY, | ||
type: e.type, | ||
originalEvent: e | ||
}; | ||
} | ||
if (this._element) { | ||
this._unbindFromCurrent(); | ||
} | ||
return { | ||
pageX: e.pageX, | ||
pageY: e.pageY, | ||
type: e.type, | ||
ctrlKey: e.ctrlKey, | ||
shiftKey: e.shiftKey, | ||
altKey: e.altKey, | ||
originalEvent: e | ||
}; | ||
} | ||
this._element = element; | ||
var noop = function noop() {}; | ||
bind(element, "mousedown", this._mousedown); | ||
bind(element, "touchstart", this._touchstart); | ||
bind(element, "touchmove", this._touchmove); | ||
bind(element, "touchend", this._touchend); | ||
}; | ||
// 300ms is the usual mouse interval; | ||
// However, an underpowered mobile device under a heavy load may queue mouse events for a longer period. | ||
var IGNORE_MOUSE_TIMEOUT = 2000; | ||
Draggable.prototype._unbindFromCurrent = function _unbindFromCurrent () { | ||
unbind(this._element, "mousedown", this._mousedown); | ||
unbind(this._element, "touchstart", this._touchstart); | ||
unbind(this._element, "touchmove", this._touchmove); | ||
unbind(this._element, "touchend", this._touchend); | ||
}; | ||
var Draggable = function () { | ||
function Draggable(_ref) { | ||
var _this = this; | ||
Draggable.prototype.destroy = function destroy () { | ||
this._unbindFromCurrent(); | ||
this._element = null; | ||
}; | ||
var _ref$press = _ref.press; | ||
var press = _ref$press === undefined ? noop : _ref$press; | ||
var _ref$drag = _ref.drag; | ||
var drag = _ref$drag === undefined ? noop : _ref$drag; | ||
var _ref$release = _ref.release; | ||
var release = _ref$release === undefined ? noop : _ref$release; | ||
exports.Draggable = Draggable; | ||
exports['default'] = Draggable; | ||
_classCallCheck(this, Draggable); | ||
this._touchstart = function (e) { | ||
if (e.touches.length === 1) { | ||
_this._pressHandler(e); | ||
} | ||
}; | ||
this._touchmove = function (e) { | ||
if (e.touches.length === 1) { | ||
_this._dragHandler(e); | ||
} | ||
}; | ||
this._touchend = function (e) { | ||
// the last finger has been lifted, and the user is not doing gesture. | ||
// there might be a better way to handle this. | ||
if (e.touches.length === 0 && e.changedTouches.length === 1) { | ||
_this._releaseHandler(e); | ||
_this._ignoreMouse = true; | ||
setTimeout(_this._restoreMouse, IGNORE_MOUSE_TIMEOUT); | ||
} | ||
}; | ||
this._restoreMouse = function () { | ||
_this._ignoreMouse = false; | ||
}; | ||
this._mousedown = function (e) { | ||
var which = e.which; | ||
if (which && which > 1 || _this._ignoreMouse) { | ||
return; | ||
} | ||
bind(document, "mousemove", _this._mousemove); | ||
bind(document, "mouseup", _this._mouseup); | ||
_this._pressHandler(e); | ||
}; | ||
this._mousemove = function (e) { | ||
_this._dragHandler(e); | ||
}; | ||
this._mouseup = function (e) { | ||
unbind(document, "mousemove", _this._mousemove); | ||
unbind(document, "mouseup", _this._mouseup); | ||
_this._releaseHandler(e); | ||
}; | ||
this._pressHandler = proxy(normalizeEvent, press); | ||
this._dragHandler = proxy(normalizeEvent, drag); | ||
this._releaseHandler = proxy(normalizeEvent, release); | ||
this._ignoreMouse = false; | ||
} | ||
_createClass(Draggable, [{ | ||
key: "bindTo", | ||
value: function bindTo(element) { | ||
if (element === this._element) { | ||
return; | ||
} | ||
if (this._element) { | ||
this._unbindFromCurrent(); | ||
} | ||
this._element = element; | ||
bind(element, "mousedown", this._mousedown); | ||
bind(element, "touchstart", this._touchstart); | ||
bind(element, "touchmove", this._touchmove); | ||
bind(element, "touchend", this._touchend); | ||
} | ||
}, { | ||
key: "_unbindFromCurrent", | ||
value: function _unbindFromCurrent() { | ||
unbind(this._element, "mousedown", this._mousedown); | ||
unbind(this._element, "touchstart", this._touchstart); | ||
unbind(this._element, "touchmove", this._touchmove); | ||
unbind(this._element, "touchend", this._touchend); | ||
} | ||
}, { | ||
key: "destroy", | ||
value: function destroy() { | ||
this._unbindFromCurrent(); | ||
this._element = null; | ||
} | ||
}]); | ||
return Draggable; | ||
}(); | ||
exports.default = Draggable; | ||
/***/ } | ||
/******/ ]); | ||
//# sourceMappingURL=main.js.map | ||
/***/ } | ||
/******/ ]))); | ||
//# sourceMappingURL=draggable.js.map |
@@ -275,3 +275,3 @@ (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap | ||
this.activeIndex = this.index; | ||
this.itemChanged.emit({ index: this.activeIndex, item: this.view[1] }); | ||
this.itemChanged.emit({ index: this.activeIndex, item: this.view.item(1) }); | ||
this.application.tick(); | ||
@@ -307,3 +307,3 @@ } | ||
this.transitionStyle = null; | ||
this.itemChanged.emit({ index: this.activeIndex, item: this.view[1] }); | ||
this.itemChanged.emit({ index: this.activeIndex, item: this.view.item(1) }); | ||
} | ||
@@ -310,0 +310,0 @@ } |
{ | ||
"name": "@progress/kendo-angular-scrollview", | ||
"description": "A ScrollView Component for Angular 2", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"publishConfig": { | ||
@@ -6,0 +6,0 @@ "registry": "https://registry.npm.telerik.com" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
477103
3520