Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a feature that takes width and height in percentage values. #353

Closed
Paarmita opened this issue Sep 29, 2018 · 21 comments
Closed

Adding a feature that takes width and height in percentage values. #353

Paarmita opened this issue Sep 29, 2018 · 21 comments

Comments

@Paarmita
Copy link
Member

We could add a feature in the input that can also take integer values other than an integer.

screenshot from 2018-09-29 10-31-33

File to be changed
https://github.com/publiclab/image-sequencer/blob/main/src/modules/Crop/Ui.js#L75

@gitmate gitmate bot added the module New Module idea label Sep 29, 2018
@gitmate
Copy link

gitmate bot commented Sep 29, 2018

GitMate.io thinks the contributor most likely able to help you is @jywarren.

A possibly related issue is #205 (add "drag to crop" UI feature to Crop module).

1 similar comment
@gitmate
Copy link

gitmate bot commented Sep 29, 2018

GitMate.io thinks the contributor most likely able to help you is @jywarren.

A possibly related issue is #205 (add "drag to crop" UI feature to Crop module).

@gitmate gitmate bot added the new-feature label Sep 29, 2018
@tech4GT tech4GT removed the module New Module idea label Sep 29, 2018
@jywarren
Copy link
Member

jywarren commented Sep 29, 2018 via email

@jywarren
Copy link
Member

jywarren commented Sep 29, 2018 via email

@tech4GT
Copy link
Member

tech4GT commented Sep 29, 2018

Hmm, I would have to think this through, this seems a little tricky to me!

@tech4GT
Copy link
Member

tech4GT commented Sep 29, 2018

I mean the whole point of using % is so users do not have to tinker around with exact positions, so just implementing this in height and width wouldn't cut it, what do you think @jywarren ?

@jywarren
Copy link
Member

jywarren commented Sep 29, 2018 via email

@tech4GT
Copy link
Member

tech4GT commented Sep 29, 2018

Hmm, I think maybe we can allow % in all fields and then someone can clip the image from 30% to 60%

@tech4GT
Copy link
Member

tech4GT commented Sep 29, 2018

I think the best way to do this is to define a function on sequencer itself which parses the input and if it is in % then it picks up the output and generates coordinates from that, what say?

@jywarren
Copy link
Member

jywarren commented Sep 29, 2018 via email

@tech4GT
Copy link
Member

tech4GT commented Sep 29, 2018

something like sequencer.parseCoordinates(input)

@jywarren
Copy link
Member

jywarren commented Sep 29, 2018 via email

@Paarmita
Copy link
Member Author

Paarmita commented Sep 29, 2018

The default for width and height is 100%, so from there I got this idea. This will not be okay for x and y fields as they are coordinates with (0,0).
@tech4GT Yeah this is a tricky task as we need to add % and int both.

@tech4GT
Copy link
Member

tech4GT commented Oct 5, 2018

@Paarmita The idea here is to have a function through which we pipe the inputs and it generates the coordinates based on image dimensions, you are right the default value for (x,y) is (0,0) but someone might want to clip the image from 20% to 50%. So let's create a function which can be used across all modules which deal with coordinates(like overlay).
PS This was a great idea! Thanks!! 😄

@Divy123
Copy link
Member

Divy123 commented Nov 2, 2018

Can I work on this issue?
@tech4GT

@Paarmita
Copy link
Member Author

Paarmita commented Nov 3, 2018

@Divy123 Yes, You can as no one is currently working on it.

@Divy123
Copy link
Member

Divy123 commented Nov 13, 2018

@Paarmita can you please guide me on how to start with this?
I was looking through the discussion above and concluded that we require a function that takes the input ,parses it and converts to the coordinates.

@jywarren
Copy link
Member

jywarren commented Nov 13, 2018 via email

@Mridul97
Copy link

@tech4GT I would like to work on this issue!

@Divy123
Copy link
Member

Divy123 commented Dec 30, 2018

I am currently working on it.
You may please work on some other issue.
The PR will be opened soon enough.

@Mridul97
Copy link

Yes, sure! @Divy123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants