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

Closed
isaacl opened this issue Mar 11, 2017 · 5 comments · Fixed by #191
Closed

square highlighting isn't perfectly aligned #51

isaacl opened this issue Mar 11, 2017 · 5 comments · Fixed by #191
Labels

Comments

@isaacl
Copy link
Member

@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
Copy link
Member Author

@isaacl isaacl commented Mar 11, 2017

image

@isaacl
Copy link
Member 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
Copy link
Member Author

@isaacl isaacl commented Jun 26, 2017

from opperwezen stream:
image

this would be nice to fix

@PureLines
Copy link

@PureLines PureLines commented Aug 13, 2020

Any updates on this issue?

It’s ok in 7.5.1 version.

@niklasf
Copy link
Member

@niklasf niklasf commented Aug 13, 2020

It's ok in Chrome with the rounding trick, but still broken when using browser zoom or in other browsers.

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

Successfully merging a pull request may close this issue.

3 participants