junkboy0315/react-compare-image

Slider position

Closed this issue · 7 comments

Hi there.
Terrific component you've got here, so simple yet so powerful. I was wondering wether there's a way to know the slider's position at will. A hook event, that provides the slider position, onSlideStart or onSlideEnd would do the trick. I'll look into your code. Would you accept a PR?
Thank you for your time

Hi @OscarCR88
so you want to know position of the slider at the start(end) of sliding, right?
anyway, PR is welcome!

Any particular steps to build the project?

nothing. just write logic and run yarn serve 😉
it's better to have a test code, if you can.

Hi there
I'm trying to generate the bundle.js, by running yarn build, but I'm getting an error:

E:\...\react-compare-image\node_modules\webpack-cli\bin\config-yargs.js:89
                                describe: optionsSchema.definitions.output.properties.path.description,
                                                                           ^

TypeError: Cannot read property 'properties' of undefined
    at module.exports (E:\...\App\react-compare-image\node_modules\webpack-cli\bin\config-yargs.js:89:48)
    at E:\...\ App\react-compare-image\node_modules\webpack-cli\bin\webpack.js:60:27
    at Object.<anonymous> (E:\...\App\react-compare-image\node_modules\webpack-cli\bin\webpack.js:515:3)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
error Command failed with exit code 1.

can you comment on that?
Thank you

I think the following may be the cause.
webpack/webpack#8082 (comment)

Do you have global installed webpack-cli ?
Or did you upgraded webpack-cli of the project manually ?

hmm, nevermind. Anyways, I'm ready to make a PR: I've created a new branch, and provided test code. What would be the next step? Sorry, it's my first contribution

standard procedure is as follows:

  • fork the repo to your private account
  • edit the repo
  • make a pull request

https://help.github.com/articles/fork-a-repo/