maxulyanov / imagecomparison Goto Github PK
View Code? Open in Web Editor NEWSlider to quickly compare two images
Home Page: https://m-ulyanov.github.io/image-comparison/
License: MIT License
Slider to quickly compare two images
Home Page: https://m-ulyanov.github.io/image-comparison/
License: MIT License
Dear Ulyanov,
I want to thank you for creating this module, i do like it very much because of its lightweight size and simplicity. I recently used it for the first time and unfortunately encountered an js error when running under production mode.
I am using a gulp js minifier module which only accepts ES5, thats why i recognized your plugin been shiped as ES6 source. I did point my babel to transpile it to ES5 which worked without any error inside my dev setup. But then in the console i got the following error on this line:
if (typeof define === 'function' && define.amd) {
define('ImageComparison', [], function() {
return ImageComparison;
});
} else {
root.ImageComparison = ImageComparison;
^ Uncaught TypeError: Cannot set property 'ImageComparison' of undefined
}
I did double check my setup for causes, without success. Also i use two other npm modules shipped in ES5 which work perfectly. Removing the causing js block from your plugin does fix the error but corebreaks your module.
While searching your github, npm and examples page, i recognized that your example pages source js differs to the one in your github repo.
I hope to hear soon from you, i am out of ideas...
Best regards
Hi,
not sure if I'm missing something, but looks like the mouse action to drag the bar left and right is not working and you are left to click left or right.
Excellent module! I'm excited to find a solution that doesn't require jQuery.
I'm using browserify to manage and bundle javascript. I see you're attaching ImageComparison
to the window as a global. It would be great if you could use a UMD wrapper to support CommonJS and RequireJS.
var ImageComparison = require('image-comparison');
results in an error (module 'image comparison' not found). package.json
's main field is pointing towards a file that doesn't exist (index.js). The main field should be src/js/ImageComparison.js
at a minimum so the file can be required even if it's just attached to the window.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.