-
Notifications
You must be signed in to change notification settings - Fork 2
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
[feat] Add ruler customization options #38
Merged
itanka9
merged 4 commits into
2gis:master
from
xalvaine:add-ruler-ui-customization-options
Sep 24, 2024
Merged
[feat] Add ruler customization options #38
itanka9
merged 4 commits into
2gis:master
from
xalvaine:add-ruler-ui-customization-options
Sep 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Код превью (редачил в window.control = new RulerControl(map, {
position: 'centerRight',
mode: 'polygon',
polygonOptions: {
color: '#028EFF1A',
},
polylineOptions: {
lineColor: '#0099FF',
lineWidth: 2,
lineBorderColor: '#FFFFFF',
lineBorderWidth: 2,
lineBorder2Width: 0,
autoClosePolygon: false,
previewLineColor: '#0099FF',
},
renderCustomJointHtmlMarker: (map, coordinates) => {
return new mapgl.HtmlMarker(map, {
coordinates,
html: `<div style="width: 10px;height: 10px; background: red;transform: translate(-50%,-50%)"></div>`,
});
},
renderCustomSnapPointHtmlMarker: (map, coordinates) => {
return new mapgl.HtmlMarker(map, {
coordinates,
html: `<div style="width: 10px;height: 10px; background: red;transform: translate(-50%,-50%)"></div>`,
interactive: false,
});
},
}); |
xalvaine
commented
Sep 12, 2024
xalvaine
commented
Sep 12, 2024
xalvaine
commented
Sep 12, 2024
13dcee5
to
21c1895
Compare
21c1895
to
ca46238
Compare
itanka9
requested changes
Sep 17, 2024
Kuznecoff
reviewed
Sep 18, 2024
534b0d5
to
1d39649
Compare
itanka9
approved these changes
Sep 19, 2024
Kuznecoff
approved these changes
Sep 23, 2024
itanka9
approved these changes
Sep 23, 2024
itanka9
reviewed
Sep 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Добавил возможность кастомить:
Также добавил возможность не показывать последнюю линию в режиме рисования, но хз, насколько это универсальная фича или как её таковой сделать
Как это может выглядеть:
