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

Line width changed when zooming in gis editor #17033

Closed
MoonE opened this issue Jul 24, 2021 · 2 comments
Closed

Line width changed when zooming in gis editor #17033

MoonE opened this issue Jul 24, 2021 · 2 comments
Assignees
Labels
Bug A problem or regression with an existing feature help wanted ui Issues relating to the user interface
Projects
Milestone

Comments

@MoonE
Copy link
Contributor

MoonE commented Jul 24, 2021

Describe the bug

When zooming in the gis editor the line with / point size on the screen was meant to stay the same.
This should be handled by the following code, but it currently does nothing.

function zoomAndPan () {
var g = svg.getElementById('groupPanel');
if (!g) {
return;
}
g.setAttribute('transform', 'translate(' + x + ', ' + y + ') scale(' + scale + ')');
var id;
var circle;
$('circle.vector').each(function () {
id = $(this).attr('id');
circle = svg.getElementById(id);
$(svg).on('change', circle, {
r : (3 / scale),
'stroke-width' : (2 / scale)
});
});
var line;
$('polyline.vector').each(function () {
id = $(this).attr('id');
line = svg.getElementById(id);
$(svg).on('change', line, {
'stroke-width' : (2 / scale)
});
});
var polygon;
$('path.vector').each(function () {
id = $(this).attr('id');
polygon = svg.getElementById(id);
$(svg).on('change', polygon, {
'stroke-width' : (0.5 / scale)
});
});
}

To Reproduce

Steps to reproduce the behavior:

  1. Open the gis visualization
  2. Change the zoom level
  3. The line / point size width scales with the svg

Expected behavior

The line with / point size should remain constant on screen.

Screenshots

image

Additional context

The last working version was 4.6
Tell me which branch to target and I will provide a PR.

@williamdes
Copy link
Member

Hi @MoonE
Thank you for te report and for offering help
We will accept a PR to branch QA_5_1 as I am sure this affects 5.1 and 5.2

@williamdes williamdes added Bug A problem or regression with an existing feature help wanted ui Issues relating to the user interface labels Jul 26, 2021
@williamdes williamdes added this to the 5.1.2 milestone Jul 26, 2021
@williamdes williamdes added this to Needs triage in issues via automation Jul 26, 2021
@williamdes williamdes moved this from Needs triage to Reproduced in issues Jul 26, 2021
@williamdes
Copy link
Member

4.6.6

image

5.1.2-dev

image

@williamdes williamdes self-assigned this Jul 29, 2021
williamdes added a commit that referenced this issue Jul 29, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Reproduced to Closed Jul 29, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature help wanted ui Issues relating to the user interface
Projects
issues
  
Closed
Development

No branches or pull requests

2 participants