- Adam Bradley
+ RIGHT side sliding only
I think I figured out how to get more Mountain Dew
@@ -43,15 +43,18 @@ Adam Bradley
- Ben Sperry
+ RIGHT/LEFT sliding
I like paper
-
+
+
+
+
diff --git a/src/components/list/list.ts b/src/components/list/list.ts
index dbd44a3fb78..2abc477af6a 100644
--- a/src/components/list/list.ts
+++ b/src/components/list/list.ts
@@ -69,20 +69,19 @@ export class List extends Ion {
* @param {boolean} shouldEnable whether the item-sliding should be enabled or not
*/
enableSlidingItems(shouldEnable: boolean) {
- if (this._enableSliding !== shouldEnable) {
- this._enableSliding = shouldEnable;
-
- if (shouldEnable) {
- console.debug('enableSlidingItems');
- this._zone.runOutsideAngular(() => {
- setTimeout(() => {
- this.slidingGesture = new ItemSlidingGesture(this, this.ele);
- });
- });
-
- } else {
- this.slidingGesture && this.slidingGesture.unlisten();
- }
+ if (this._enableSliding === shouldEnable) {
+ return;
+ }
+
+ this._enableSliding = shouldEnable;
+ if (shouldEnable) {
+ console.debug('enableSlidingItems');
+ this._zone.runOutsideAngular(() => {
+ setTimeout(() => this.slidingGesture = new ItemSlidingGesture(this, this.ele));
+ });
+
+ } else {
+ this.slidingGesture && this.slidingGesture.unlisten();
}
}
@@ -119,11 +118,8 @@ export class List extends Ion {
selector: 'ion-list-header'
})
export class ListHeader {
- private _id: string;
- constructor(private _renderer: Renderer, private _elementRef: ElementRef, @Attribute('id') id: string) {
- this._id = id;
- }
+ constructor(private _renderer: Renderer, private _elementRef: ElementRef, @Attribute('id') private _id: string) { }
public get id(): string {
return this._id;
diff --git a/src/config/directives.ts b/src/config/directives.ts
index 6a040f07466..924ae7b1cf1 100644
--- a/src/config/directives.ts
+++ b/src/config/directives.ts
@@ -18,7 +18,7 @@ import {Tabs} from '../components/tabs/tabs';
import {Tab} from '../components/tabs/tab';
import {List, ListHeader} from '../components/list/list';
import {Item} from '../components/item/item';
-import {ItemSliding} from '../components/item/item-sliding';
+import {ItemSliding, ItemOptions} from '../components/item/item-sliding';
import {VirtualScroll} from '../components/virtual-scroll/virtual-scroll';
import {VirtualItem, VirtualHeader, VirtualFooter} from '../components/virtual-scroll/virtual-item';
import {Toolbar, ToolbarTitle, ToolbarItem} from '../components/toolbar/toolbar';
@@ -134,6 +134,7 @@ export const IONIC_DIRECTIVES: any[] = [
ListHeader,
Item,
ItemSliding,
+ ItemOptions,
VirtualScroll,
VirtualItem,
VirtualHeader,