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

smartphoto

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartphoto - npm Package Compare versions

Comparing version 0.2.13 to 0.2.14

examples/resizeFit.html

2

.csscomb.json

@@ -5,3 +5,3 @@ {

"color-case": "upper",
"block-indent": "\t",
"block-indent": " ",
"color-shorthand": true,

@@ -8,0 +8,0 @@ "element-case": "lower",

@@ -122,4 +122,4 @@ 'use strict';

_this._resetTranslate();
_this.setPosByCurrentIndex();
_this.setSizeByScreen();
_this._setPosByCurrentIndex();
_this._setSizeByScreen();
_this.update();

@@ -131,5 +131,5 @@ });

_this._resetTranslate();
_this.setPosByCurrentIndex();
_this.setHashByCurrentIndex();
_this.setSizeByScreen();
_this._setPosByCurrentIndex();
_this._setHashByCurrentIndex();
_this._setSizeByScreen();
_this.update();

@@ -144,2 +144,3 @@ });

var originalEvent = e.originalEvent || e;
var orientation = window.orientation;
if (!originalEvent || !originalEvent.gamma || _this.data.appearEffect) {

@@ -149,6 +150,10 @@ return;

if (!_this.isBeingZoomed && !_this.photoSwipable && !_this.data.elastic && _this.data.scale) {
if (window.innerHeight > window.innerWidth) {
if (orientation === 0) {
_this._calcGravity(originalEvent.gamma, originalEvent.beta);
} else {
} else if (orientation === 90) {
_this._calcGravity(originalEvent.beta, originalEvent.gamma);
} else if (orientation === -90) {
_this._calcGravity(-originalEvent.beta, -originalEvent.gamma);
} else if (orientation === 180) {
_this._calcGravity(-originalEvent.gamma, -originalEvent.beta);
}

@@ -277,3 +282,3 @@ }

_this3.data.currentIndex = parseInt(element.getAttribute('data-index'));
_this3.setHashByCurrentIndex();
_this3._setHashByCurrentIndex();
var currentItem = _this3._getSelectedItem();

@@ -300,4 +305,4 @@ if (currentItem.loaded) {

this.data.photoPosY = 0;
this.setPosByCurrentIndex();
this.setSizeByScreen();
this._setPosByCurrentIndex();
this._setSizeByScreen();
this.setArrow();

@@ -460,4 +465,4 @@ if (this.data.resizeStyle === 'fill' && this.data.isSmartPhone) {

}, {
key: 'setPosByCurrentIndex',
value: function setPosByCurrentIndex() {
key: '_setPosByCurrentIndex',
value: function _setPosByCurrentIndex() {
var _this8 = this;

@@ -475,4 +480,4 @@

}, {
key: 'setHashByCurrentIndex',
value: function setHashByCurrentIndex() {
key: '_setHashByCurrentIndex',
value: function _setHashByCurrentIndex() {
var scrollLocation = (0, _zeptoBrowserify.$)(window).scrollTop();

@@ -523,4 +528,4 @@ var items = this.groupItems();

}, {
key: 'setSizeByScreen',
value: function setSizeByScreen() {
key: '_setSizeByScreen',
value: function _setSizeByScreen() {
var windowX = window.innerWidth;

@@ -543,10 +548,10 @@ var windowY = window.innerHeight;

}, {
key: 'slideList',
value: function slideList() {
key: '_slideList',
value: function _slideList() {
var _this9 = this;
this.data.onMoveClass = true;
this.setPosByCurrentIndex();
this.setHashByCurrentIndex();
this.setSizeByScreen();
this._setPosByCurrentIndex();
this._setHashByCurrentIndex();
this._setSizeByScreen();
setTimeout(function () {

@@ -565,3 +570,3 @@ _this9.data.onMoveClass = false;

}
this.slideList();
this._slideList();
}

@@ -642,3 +647,3 @@ }, {

}
this.slideList();
this._slideList();
}

@@ -650,3 +655,3 @@ if (this.moveDir === 'vertical') {

this.data.translateY = 0;
this.slideList();
this._slideList();
}

@@ -811,2 +816,5 @@ }

this.data.scaleSize += this._round(size, 6);
if (this.data.scaleSize < 0.2) {
this.data.scaleSize = 0.2;
}
//todo

@@ -813,0 +821,0 @@ if (this.data.scaleSize < oldScaleSize) {

{
"name": "smartphoto",
"version": "0.2.13",
"version": "0.2.14",
"description": "smartphoto",

@@ -5,0 +5,0 @@ "homepage": "http://developer.a-blogcms.jp",

@@ -7,3 +7,3 @@ # SmartPhoto

## Feature
- Flick images to zoom/drag images and also switch to next images
- zoom/drag images and also flick to next images
- Use Accelerometer to move images

@@ -10,0 +10,0 @@ - Scale images to fill/fit on the screen so to view each image clearly

@@ -102,4 +102,4 @@ import aTemplate from 'a-template';

this._resetTranslate();
this.setPosByCurrentIndex();
this.setSizeByScreen();
this._setPosByCurrentIndex();
this._setSizeByScreen();
this.update();

@@ -111,5 +111,5 @@ });

this._resetTranslate();
this.setPosByCurrentIndex();
this.setHashByCurrentIndex();
this.setSizeByScreen();
this._setPosByCurrentIndex();
this._setHashByCurrentIndex();
this._setSizeByScreen();
this.update();

@@ -124,2 +124,3 @@ });

let originalEvent = e.originalEvent || e;
const orientation = window.orientation;
if(!originalEvent || !originalEvent.gamma || this.data.appearEffect){

@@ -129,6 +130,10 @@ return;

if(!this.isBeingZoomed && !this.photoSwipable && !this.data.elastic && this.data.scale){
if (window.innerHeight > window.innerWidth) {
if (orientation === 0) {
this._calcGravity(originalEvent.gamma, originalEvent.beta);
} else {
} else if (orientation === 90) {
this._calcGravity(originalEvent.beta, originalEvent.gamma);
} else if (orientation === -90) {
this._calcGravity(-originalEvent.beta, -originalEvent.gamma);
} else if (orientation === 180) {
this._calcGravity(-originalEvent.gamma, -originalEvent.beta);
}

@@ -244,3 +249,3 @@ }

this.data.currentIndex = parseInt(element.getAttribute('data-index'));
this.setHashByCurrentIndex();
this._setHashByCurrentIndex();
const currentItem = this._getSelectedItem();

@@ -266,4 +271,4 @@ if(currentItem.loaded) {

this.data.photoPosY = 0;
this.setPosByCurrentIndex();
this.setSizeByScreen();
this._setPosByCurrentIndex();
this._setSizeByScreen();
this.setArrow();

@@ -412,3 +417,3 @@ if(this.data.resizeStyle === 'fill' && this.data.isSmartPhone){

setPosByCurrentIndex () {
_setPosByCurrentIndex () {
const items = this.groupItems();

@@ -424,3 +429,3 @@ const moveX = -1 * items[this.data.currentIndex].translateX;

setHashByCurrentIndex () {
_setHashByCurrentIndex () {
const scrollLocation = $(window).scrollTop();

@@ -469,3 +474,3 @@ const items = this.groupItems();

setSizeByScreen () {
_setSizeByScreen () {
const windowX = window.innerWidth;

@@ -488,7 +493,7 @@ const windowY = window.innerHeight;

slideList () {
_slideList () {
this.data.onMoveClass = true;
this.setPosByCurrentIndex();
this.setHashByCurrentIndex();
this.setSizeByScreen();
this._setPosByCurrentIndex();
this._setHashByCurrentIndex();
this._setSizeByScreen();
setTimeout(() => {

@@ -506,3 +511,3 @@ this.data.onMoveClass = false;

}
this.slideList();
this._slideList();
}

@@ -580,3 +585,3 @@

}
this.slideList();
this._slideList();
}

@@ -588,3 +593,3 @@ if (this.moveDir === 'vertical') {

this.data.translateY = 0;
this.slideList();
this._slideList();
}

@@ -739,2 +744,5 @@ }

this.data.scaleSize += this._round(size,6);
if(this.data.scaleSize < 0.2) {
this.data.scaleSize = 0.2;
}
//todo

@@ -741,0 +749,0 @@ if(this.data.scaleSize < oldScaleSize) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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