js-cloudimage-360-view
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -482,2 +482,10 @@ 'use strict'; | ||
}, { | ||
key: 'getOriginalSrc', | ||
value: function getOriginalSrc() { | ||
var currentImage = this.images[this.activeImage - 1]; | ||
var lastIndex = currentImage.src.lastIndexOf('//'); | ||
return lastIndex > 10 ? currentImage.src.slice(lastIndex) : currentImage.src; | ||
} | ||
}, { | ||
key: 'magnify', | ||
@@ -487,5 +495,4 @@ value: function magnify() { | ||
var nextZeroFilledIndex = (0, _ci.pad)(this.activeImage, this.indexZeroBase); | ||
var src = '' + this.folder + this.filename.replace('{index}', nextZeroFilledIndex); | ||
var image = new Image(); | ||
var src = this.getOriginalSrc(); | ||
@@ -492,0 +499,0 @@ image.src = src; |
@@ -43,3 +43,3 @@ 'use strict'; | ||
return currentViewer && currentViewer.activeImage; | ||
return currentViewer && currentViewer.activeImage - 1; | ||
} | ||
@@ -46,0 +46,0 @@ |
{ | ||
"name": "js-cloudimage-360-view", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -1,2 +0,2 @@ | ||
[![Release](https://img.shields.io/badge/release-v2.3.0-blue.svg)](https://github.com/scaleflex/js-cloudimage-360-view/releases) | ||
[![Release](https://img.shields.io/badge/release-v2.3.1-blue.svg)](https://github.com/scaleflex/js-cloudimage-360-view/releases) | ||
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](#contributing) | ||
@@ -71,3 +71,3 @@ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) | ||
```javascript | ||
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2.3.0/js-cloudimage-360-view.min.js"></script> | ||
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2.3.1/js-cloudimage-360-view.min.js"></script> | ||
``` | ||
@@ -128,2 +128,12 @@ | ||
### getActiveIndexByID | ||
###### Type: **Function** | ||
Get the {index} of the image that is being viewed. | ||
```javascript | ||
window.CI360.getActiveIndexByID('id_of_product'); | ||
``` | ||
## <a name="configuration"></a> Config | ||
@@ -130,0 +140,0 @@ |
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
59440
1072
430