Sha256: 2a9bc5c857e513fb1724b1c044e7714df74bb83b1d1e5a2b917f0a9c462d39b1
Contents?: true
Size: 916 Bytes
Versions: 1
Compression:
Stored size: 916 Bytes
Contents
/** * @namespace WORKAREA.customSizing */ WORKAREA.registerModule('customSizing', (function () { 'use strict'; var customSize = function (event) { var target = $(this).data("target") // $('.item.has-overlayed-item').add(target).removeClass("has-overlayed-item") const image = document.getElementsByClassName('scalable_main_image'); console.log(image); const cropper = new Cropper(image, { aspectRatio: 16 / 9, crop(event) { console.log(event.detail.x); console.log(event.detail.y); console.log(event.detail.width); console.log(event.detail.height); console.log(event.detail.rotate); console.log(event.detail.scaleX); console.log(event.detail.scaleY); }, }); }, init = function ($scope) { $('input[value="custom"]', $scope).on('click', customSize); }; return { init: init }; }()));
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
workarea-image_decoration-1.0.0.pre | app/assets/javascripts/workarea/storefront/image_decoration/modules/custom_sizing.js |