ionic-swiper
Advanced tools
Comparing version 0.2.4 to 0.2.5
{ | ||
"name": "ionic-swiper", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "An angular wrapper for swiper focused on ionic v1 as an 'swipe' lib (not slide)", | ||
@@ -5,0 +5,0 @@ "main": "src/swiper.module.js", |
@@ -1,6 +0,5 @@ | ||
import { directiveName } from './swiper.container.directive'; | ||
import { SWIPER_CONTAINER_STATE_UPDATE, SWIPER_DESTROY_EVENT } from './swiper.events'; | ||
import { equals, findIndex, pipe, prop, unless } from 'ramda'; | ||
import { eqPointer } from './functional.core'; | ||
import { SwiperConfigurationsProvider } from './swiper.configs.provider'; | ||
import {directiveName} from './swiper.container.directive'; | ||
import {SWIPER_CONTAINER_STATE_UPDATE, SWIPER_DESTROY_EVENT} from './swiper.events'; | ||
import {equals, prop, unless} from 'ramda'; | ||
import {eqPointer} from './functional.core'; | ||
@@ -53,7 +52,5 @@ export const controllerName = 'SwiperContainerController'; | ||
swiper.prependSlide(slideElement); | ||
swiper.slideNext(0); | ||
}), | ||
toRight: () => swiperPromise.then(swiper => { | ||
swiper.appendSlide(slideElement); | ||
swiper.slidePrev(0); | ||
}), | ||
@@ -85,2 +82,2 @@ toCenter: () => swiperPromise.then(swiper => { | ||
}; | ||
} | ||
} |
@@ -18,15 +18,5 @@ import {directiveName as containerName} from './swiper.container.directive'; | ||
'use strict'; | ||
const slideClass = SwiperConfigurations.slideClass; | ||
const noSwipingClass = SwiperConfigurations.noSwipingClass; | ||
return { | ||
restrict: 'A', | ||
require:`^^${containerName}`, | ||
/** | ||
* @param {$rootScope.Scope} $scope | ||
* @param {$element} $element | ||
* @param {$attr} $attr | ||
* @param {SwiperContainerController} $ctrl | ||
* */ | ||
link: function ($scope, $element, $attr, $ctrl) { | ||
@@ -36,6 +26,4 @@ const swiperItem = $attr[directiveName] || 'center'; | ||
$attr.$addClass(slideClass); | ||
$scope.$on(SWIPER_CONTAINER_STATE_UPDATE, (event, enableSwiper) => { | ||
if(swiperItem === 'center'){ | ||
if(!enableSwiper && swiperItem === 'center'){ | ||
$ctrl.slideToElement($element[0]); | ||
@@ -42,0 +30,0 @@ } |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
305518
351