Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nativescript-slides

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-slides - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

.vscode/settings.json

66

nativescript-slides.js

@@ -19,2 +19,3 @@ "use strict";

var SLIDE_INDICATOR_ACTIVE = 'slide-indicator-active';
var SLIDE_INDICATOR_WRAP = 'slide-indicator-wrap';
var LayoutParams;

@@ -77,3 +78,3 @@ if (app.android) {

get: function () {
return !!this.currentPanel.right;
return !!this.currentPanel && !!this.currentPanel.right;
},

@@ -85,3 +86,3 @@ enumerable: true,

get: function () {
return !!this.currentPanel.left;
return !!this.currentPanel && !!this.currentPanel.left;
},

@@ -172,2 +173,3 @@ enumerable: true,

this.on(absolute_layout_1.AbsoluteLayout.loadedEvent, function (data) {
console.log('LOADDED EVENT');
if (!_this._loaded) {

@@ -194,29 +196,31 @@ _this._loaded = true;

_this.currentPanel = _this.buildSlideMap(slides_1);
_this.positionPanels(_this.currentPanel);
if (_this.disablePan === false) {
_this.applySwipe(_this.pageWidth);
if (_this.currentPanel) {
_this.positionPanels(_this.currentPanel);
if (_this.disablePan === false) {
_this.applySwipe(_this.pageWidth);
}
if (app.ios) {
_this.ios.clipsToBound = true;
}
app.on(app.orientationChangedEvent, function (args) {
setTimeout(function () {
console.log('orientationChangedEvent');
_this.width = parseInt(_this.slideWidth);
_this.eachLayoutChild(function (view) {
if (view instanceof stack_layout_1.StackLayout) {
absolute_layout_1.AbsoluteLayout.setLeft(view, _this.pageWidth);
view.width = _this.pageWidth;
}
});
if (_this.disablePan === false) {
_this.applySwipe(_this.pageWidth);
}
var topOffset = Platform.screen.mainScreen.heightDIPs - 105;
if (_this.pageIndicators) {
_this._footer.marginTop = '88%';
}
_this.positionPanels(_this.currentPanel);
}, 0);
});
}
if (app.ios) {
_this.ios.clipsToBound = true;
}
app.on(app.orientationChangedEvent, function (args) {
setTimeout(function () {
console.log('orientationChangedEvent');
_this.width = parseInt(_this.slideWidth);
_this.eachLayoutChild(function (view) {
if (view instanceof stack_layout_1.StackLayout) {
absolute_layout_1.AbsoluteLayout.setLeft(view, _this.pageWidth);
view.width = _this.pageWidth;
}
});
if (_this.disablePan === false) {
_this.applySwipe(_this.pageWidth);
}
var topOffset = Platform.screen.mainScreen.heightDIPs - 105;
if (_this.pageIndicators) {
_this._footer.marginTop = '88%';
}
_this.positionPanels(_this.currentPanel);
}, 0);
});
}

@@ -278,3 +282,3 @@ });

SlideContainer.prototype.goToSlide = function (index) {
if (this._slideMap.length > 0 && index < this._slideMap.length) {
if (this._slideMap && this._slideMap.length > 0 && index < this._slideMap.length) {
var previousSlide = this.currentPanel;

@@ -447,6 +451,4 @@ this.setupPanel(this._slideMap[index]);

footerInnerWrap.clipToBounds = false;
footerInnerWrap.className = SLIDE_INDICATOR_WRAP;
absolute_layout_1.AbsoluteLayout.setTop(footerInnerWrap, 0);
footerInnerWrap.orientation = 'horizontal';
footerInnerWrap.verticalAlignment = 'top';
footerInnerWrap.horizontalAlignment = 'center';
footerInnerWrap.width = this.pageWidth / 2;

@@ -453,0 +455,0 @@ var index = 0;

@@ -21,3 +21,3 @@ require("nativescript-dom");

const SLIDE_INDICATOR_ACTIVE = 'slide-indicator-active';
const SLIDE_INDICATOR_WRAP = 'slide-indicator-wrap';
let LayoutParams: any;

@@ -87,6 +87,6 @@ if (app.android) {

get hasNext(): boolean {
return !!this.currentPanel.right;
return !!this.currentPanel && !!this.currentPanel.right;
}
get hasPrevious(): boolean {
return !!this.currentPanel.left;
return !!this.currentPanel && !!this.currentPanel.left;
}

@@ -175,2 +175,3 @@

this.on(AbsoluteLayout.loadedEvent, (data: any) => {
console.log('LOADDED EVENT');
if (!this._loaded) {

@@ -201,33 +202,36 @@ this._loaded = true;

this.currentPanel = this.buildSlideMap(slides);
this.positionPanels(this.currentPanel);
if (this.currentPanel) {
if (this.disablePan === false) {
this.applySwipe(this.pageWidth);
this.positionPanels(this.currentPanel);
if (this.disablePan === false) {
this.applySwipe(this.pageWidth);
}
if (app.ios) {
this.ios.clipsToBound = true;
}
//handles application orientation change
app.on(app.orientationChangedEvent, (args: app.OrientationChangedEventData) => {
//event and page orientation didn't seem to alwasy be on the same page so setting it in the time out addresses this.
setTimeout(() => {
console.log('orientationChangedEvent');
this.width = parseInt(this.slideWidth);
this.eachLayoutChild((view: View) => {
if (view instanceof StackLayout) {
AbsoluteLayout.setLeft(view, this.pageWidth);
view.width = this.pageWidth;
}
});
if (this.disablePan === false) {
this.applySwipe(this.pageWidth);
}
let topOffset = Platform.screen.mainScreen.heightDIPs - 105;
if (this.pageIndicators) {
this._footer.marginTop = <any>'88%';
}
this.positionPanels(this.currentPanel);
}, 0);
});
}
if (app.ios) {
this.ios.clipsToBound = true;
}
//handles application orientation change
app.on(app.orientationChangedEvent, (args: app.OrientationChangedEventData) => {
//event and page orientation didn't seem to alwasy be on the same page so setting it in the time out addresses this.
setTimeout(() => {
console.log('orientationChangedEvent');
this.width = parseInt(this.slideWidth);
this.eachLayoutChild((view: View) => {
if (view instanceof StackLayout) {
AbsoluteLayout.setLeft(view, this.pageWidth);
view.width = this.pageWidth;
}
});
if (this.disablePan === false) {
this.applySwipe(this.pageWidth);
}
let topOffset = Platform.screen.mainScreen.heightDIPs - 105;
if (this.pageIndicators) {
this._footer.marginTop = <any>'88%';
}
this.positionPanels(this.currentPanel);
}, 0);
});
}

@@ -297,3 +301,3 @@ });

public goToSlide(index: number): void {
if (this._slideMap.length > 0 && index < this._slideMap.length) {
if (this._slideMap && this._slideMap.length > 0 && index < this._slideMap.length) {
let previousSlide = this.currentPanel;

@@ -492,10 +496,8 @@

footerInnerWrap.clipToBounds = false;
footerInnerWrap.className = SLIDE_INDICATOR_WRAP;
AbsoluteLayout.setTop(footerInnerWrap, 0);
footerInnerWrap.orientation = 'horizontal';
footerInnerWrap.verticalAlignment = 'top';
footerInnerWrap.horizontalAlignment = 'center';
footerInnerWrap.width = this.pageWidth / 2;

@@ -502,0 +504,0 @@

{
"name": "nativescript-slides",
"version": "2.2.1",
"version": "2.2.2",
"description": "NativeScript Slides plugin.",

@@ -5,0 +5,0 @@ "main": "nativescript-slides.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc