FNNDSC / FNNDSC/ami

Use pixel ratio in StackHelper borders and LocalizerHelper

Open
#255 8 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
745
Forks
212
PR merge metrics
No merged PRs in 30d

Description

Got **StackHelper** and **LocalizerHelper** strange behavior when loading AMI with different browser zoom.

In my code I have this (taken from examples):
```
...stackHelper.slice.canvasWidth = ...clientWidth;
...stackHelper.slice.canvasHeight = ...clientHeight;
```

When page is loaded with browser zoom 125% the dashed border is reduced (if zoom is higher than 100%) and Localizer lines is absent at all:
![Zoom: 125%](https://user-images.githubusercontent.com/26387367/37016474-716a0560-211d-11e8-812c-1338753863de.png)
The larger the initial zoom the smaller the area of the dashed border

When page is loaded with browser zoom 100% everything is normal:
![Zoom: 100%](https://user-images.githubusercontent.com/26387367/37016792-0d8fdcc0-211f-11e8-8a7f-d1824dcaf76c.png)

AMI: v0.0.23dev (+ Ext JS framework)

Example [viewers_quadview](https://fnndsc.github.io/ami/#viewers_quadview) works perfectly with any zoom so the problem is likely in my code.

Any suggestions where to search?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.