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

square highlighting isn't perfectly aligned #51

Open
isaacl opened this issue Mar 11, 2017 · 3 comments
Open

square highlighting isn't perfectly aligned #51

isaacl opened this issue Mar 11, 2017 · 3 comments
Labels
bug

Comments

@isaacl
Copy link
Contributor

@isaacl isaacl commented Mar 11, 2017

It's more obvious with the grey premove overlay, but visible for green move highlights too. In screenshot below, the green move highlight is not quite even with the bottom of d5.

My board zoom is at about 1/5 of the slider.

image

@isaacl

This comment has been minimized.

Copy link
Contributor Author

@isaacl isaacl commented Mar 11, 2017

image

@isaacl

This comment has been minimized.

Copy link
Contributor Author

@isaacl isaacl commented Apr 1, 2017

SVG rects are perfectly aligned -- let's switch highlight to position via svg:

function renderSquare(pos: cg.Pos, bounds: ClientRect, style: string): SVGElement {
  const o = posToTranslate(pos, true, bounds);
  return setAttributes(createElement('rect'), {
    style: style,
    x: o[0],
    y: o[1],
    width: bounds.width / 8,
    height: bounds.height / 8
  });
}
@isaacl

This comment has been minimized.

Copy link
Contributor Author

@isaacl isaacl commented Jun 26, 2017

from opperwezen stream:
image

this would be nice to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.