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

input@position is saying too much? #27

Open
joanma747 opened this issue Sep 27, 2018 · 3 comments
Open

input@position is saying too much? #27

joanma747 opened this issue Sep 27, 2018 · 3 comments

Comments

@joanma747
Copy link
Contributor

joanma747 commented Sep 27, 2018

In the following example:

<input name=ymin type=location units=tilematrix rel=image position=top-left axis=row>
<input name=ymax type=location units=tilematrix rel=image position=bottom-left axis=row>
<input name=xmin type=location units=tilematrix rel=image position=top-left axis=column>
<input name=xmax type=location units=tilematrix rel=image position=bottom-right axis=column>

we can see that axis indicates a direction: "row" or "column", "x" or "y", "i" or "j"...
Then "position" mentions two directions at the same time what is not necessary. I should expect something like this:

<input name=ymin type=location units=tilematrix rel=image position=top axis=row>
<input name=ymax type=location units=tilematrix rel=image position=bottom axis=row>
<input name=xmin type=location units=tilematrix rel=image position=left axis=column>
<input name=xmax type=location units=tilematrix rel=image position=right axis=column>

This proposal simplifies the current list "input@position" from the current 9 values to 5 values:

  • top
  • left
  • right
  • bottom
  • center

Note this discussion is independent of the discussion about adding "tile-" or "image-" exposed in issue #24

@prushforth
Copy link
Member

prushforth commented Sep 27, 2018

<input name=ymin type=location units=tilematrix rel=image position=top axis=column>

That is ambiguous since there are many possible column values. I think we need the position to refer to a point location so that there is no ambiguity.

@joanma747
Copy link
Contributor Author

joanma747 commented Sep 27, 2018

The point is defined by 2 inputs and not by a single one:

The top-left corner is defined by:

<input name=ymin type=location units=tilematrix rel=image position=top axis=row>
<input name=xmin type=location units=tilematrix rel=image position=left axis=column>

inputs are 1-dimensional.

@prushforth
Copy link
Member

prushforth commented Sep 27, 2018

inputs are 1-dimensional.

I can see how this could be confusing. There's no way to compose an object with an input. So my notion here is that the coordinates of the event would be parsed by the input serialization process and the requested axis of the "location" be serialized. I could foresee the concept of providing a template (in an attribute) that could serialize the whole coordinate pair in a custom way (for example reversing the axis order, formatting decimal points ...) but I didn't want to get fancy for no reason at this stage.

So having the input@location serialize some part of the location (a single axis value) seemed like a simple solution.

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

No branches or pull requests

2 participants