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

v-viewer

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-viewer - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

8

dist/v-viewer.js

@@ -9,3 +9,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

else
root["VueViewer"] = factory(root["viewerjs"], root["viewerjs/dist/viewer.css"]);
root["VueViewer"] = factory(root["Viewer"], root["viewerjs/dist/viewer.css"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_1__) {

@@ -111,5 +111,7 @@ return /******/ (function(modules) { // webpackBootstrap

function createViewer(el, binding) {
var options = binding.value;
el['$' + name] && el['$' + name].destroy();
el['$' + name] = new __WEBPACK_IMPORTED_MODULE_0_viewerjs___default.a(el, options);
Vue.nextTick(function () {
var options = binding.value;
el['$' + name] = new __WEBPACK_IMPORTED_MODULE_0_viewerjs___default.a(el, options);
});
}

@@ -116,0 +118,0 @@

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("viewerjs"),require("viewerjs/dist/viewer.css")):"function"==typeof define&&define.amd?define(["viewerjs","viewerjs/dist/viewer.css"],t):"object"==typeof exports?exports.VueViewer=t(require("viewerjs"),require("viewerjs/dist/viewer.css")):e.VueViewer=t(e.viewerjs,e["viewerjs/dist/viewer.css"])}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(1),s=(n.n(o),function(e,t){function n(e,t){var n=t.value;e["$"+s]&&e["$"+s].destroy(),e["$"+s]=new i.a(e,n)}function r(e){c&&console.log(e)}var o=t.name,s=void 0===o?"viewer":o,u=t.debug,c=void 0!==u&&u;e.directive("viewer",{bind:function(e,t){r("viewer bind")},inserted:function(e,t){r("viewer inserted"),n(e,t)},componentUpdated:function(e,t){r("viewer componentUpdated"),n(e,t)},unbind:function(e,t){r("viewer unbind"),e["$"+s]&&e["$"+s].destroy()}})});t.a={install:s}},function(e,t,n){"use strict";function r(){var e={},t=!1,n=0,i=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],n++);n<i;n++){var o=arguments[n];!function(n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t&&"[object Object]"===Object.prototype.toString.call(n[i])?e[i]=r(!0,e[i],n[i]):e[i]=n[i])}(o)}return e}t.a=r},function(e,t,n){var r=n(7)(n(6),n(8),null,null);e.exports=r.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(4),o=n.n(i),s=n(2),u=n(0),c=n.n(u);t.default={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.name,u=void 0===i?"viewer":i,a=t.debug,f=void 0!==a&&a,d=t.defaultOptions;c.a.setDefaults(d),e.component(u,n.i(r.a)(o.a,{name:u})),e.use(s.a,{name:u,debug:f})},setDefaults:function(e){c.a.setDefaults(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n.n(r),o=n(1);n.n(o);t.default={props:{images:{type:Array,required:!0},options:{type:Object}},data:function(){return{}},computed:{},methods:{createViewer:function(){this.$viewer&&this.$viewer.destroy(),this.$viewer=new i.a(this.$el,this.options),this.$emit("inited",this.$viewer)}},watch:{images:function(){var e=this;this.$nextTick(function(){e.createViewer()})},options:{handler:function(){var e=this;this.$nextTick(function(){e.createViewer()})},deep:!0}},mounted:function(){this.createViewer()},destroyed:function(){this.$viewer&&this.$viewer.destroy()}}},function(e,t){e.exports=function(e,t,n,r){var i,o=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(i=e,o=e.default);var u="function"==typeof o?o.options:o;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),n&&(u._scopeId=n),r){var c=Object.create(u.computed||null);Object.keys(r).forEach(function(e){var t=r[e];c[e]=function(){return t}}),u.computed=c}return{esModule:i,exports:o,options:u}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._t("default",null,{images:e.images,options:e.options})],2)},staticRenderFns:[]}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("viewerjs"),require("viewerjs/dist/viewer.css")):"function"==typeof define&&define.amd?define(["viewerjs","viewerjs/dist/viewer.css"],t):"object"==typeof exports?exports.VueViewer=t(require("viewerjs"),require("viewerjs/dist/viewer.css")):e.VueViewer=t(e.Viewer,e["viewerjs/dist/viewer.css"])}(this,function(e,t){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";var i=n(0),r=n.n(i),o=n(1),s=(n.n(o),function(e,t){function n(t,n){t["$"+s]&&t["$"+s].destroy(),e.nextTick(function(){var e=n.value;t["$"+s]=new r.a(t,e)})}function i(e){c&&console.log(e)}var o=t.name,s=void 0===o?"viewer":o,u=t.debug,c=void 0!==u&&u;e.directive("viewer",{bind:function(e,t){i("viewer bind")},inserted:function(e,t){i("viewer inserted"),n(e,t)},componentUpdated:function(e,t){i("viewer componentUpdated"),n(e,t)},unbind:function(e,t){i("viewer unbind"),e["$"+s]&&e["$"+s].destroy()}})});t.a={install:s}},function(e,t,n){"use strict";function i(){var e={},t=!1,n=0,r=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],n++);n<r;n++){var o=arguments[n];!function(n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t&&"[object Object]"===Object.prototype.toString.call(n[r])?e[r]=i(!0,e[r],n[r]):e[r]=n[r])}(o)}return e}t.a=i},function(e,t,n){var i=n(7)(n(6),n(8),null,null);e.exports=i.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=n.n(r),s=n(2),u=n(0),c=n.n(u);t.default={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name,u=void 0===r?"viewer":r,a=t.debug,f=void 0!==a&&a,d=t.defaultOptions;c.a.setDefaults(d),e.component(u,n.i(i.a)(o.a,{name:u})),e.use(s.a,{name:u,debug:f})},setDefaults:function(e){c.a.setDefaults(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n.n(i),o=n(1);n.n(o);t.default={props:{images:{type:Array,required:!0},options:{type:Object}},data:function(){return{}},computed:{},methods:{createViewer:function(){this.$viewer&&this.$viewer.destroy(),this.$viewer=new r.a(this.$el,this.options),this.$emit("inited",this.$viewer)}},watch:{images:function(){var e=this;this.$nextTick(function(){e.createViewer()})},options:{handler:function(){var e=this;this.$nextTick(function(){e.createViewer()})},deep:!0}},mounted:function(){this.createViewer()},destroyed:function(){this.$viewer&&this.$viewer.destroy()}}},function(e,t){e.exports=function(e,t,n,i){var r,o=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(r=e,o=e.default);var u="function"==typeof o?o.options:o;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),n&&(u._scopeId=n),i){var c=Object.create(u.computed||null);Object.keys(i).forEach(function(e){var t=i[e];c[e]=function(){return t}}),u.computed=c}return{esModule:r,exports:o,options:u}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._t("default",null,{images:e.images,options:e.options})],2)},staticRenderFns:[]}}])});
{
"name": "v-viewer",
"version": "0.3.0",
"version": "0.3.1",
"description": "Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js",

@@ -5,0 +5,0 @@ "main": "dist/v-viewer.js",

@@ -170,3 +170,3 @@ # v-viewer

```javascript
import Viewer from 'src'
import Viewer from 'v-viewer'
import Vue from 'vue'

@@ -182,3 +182,3 @@ Vue.use(Viewer, {

```javascript
import Viewer from 'src'
import Viewer from 'v-viewer'
import Vue from 'vue'

@@ -185,0 +185,0 @@ Vue.use(Viewer)

@@ -6,5 +6,7 @@ import Viewer from 'viewerjs'

function createViewer (el, binding) {
const options = binding.value
el[`$${name}`] && el[`$${name}`].destroy()
el[`$${name}`] = new Viewer(el, options)
Vue.nextTick(() => {
const options = binding.value
el[`$${name}`] = new Viewer(el, options)
})
}

@@ -11,0 +13,0 @@

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