Problem/Motivation

Not a real problem but I added for myself an height option in .\leaflet\src\LeafletSettingsElementsTrait.php

Added 'vh' => t('vh'),
within options for $elements['height_unit'] element

line 155 in attached file

Steps to reproduce

N/A

Proposed resolution

Apply entry (even if not a resolution as such)

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

Comments

Civette created an issue. See original summary.

nwom’s picture

Version: 2.1.0 » 2.1.x-dev
Status: Active » Needs review
Issue tags: -height option
StatusFileSize
new3.49 KB

Thanks for your work! Here is a patch based on it.

nwom’s picture

Title: height unit option feature request » Add vh as a height unit option
nwom’s picture

StatusFileSize
new3.49 KB
new612 bytes

There was a spacing issues on one of the lines. Fixed it really quick. Please review.

itamair’s picture

Status: Needs review » Needs work

sure about this patch NWOM????
I can see this in your patch ...

- * Class LeafletSettingsElementsTrait.
+ * Class GeofieldMapFieldTrait.

and it looks you are messing code from GeofieldMap into Leaflet ... isn't it?

Please, make sure all this works for you without GeofieldMap ...

itamair’s picture

Also it looks you are changing public static function getDefaultSettings() values without special reasons ...

Patch definitely rejected on this form.

Please clean it up of all those useless changes to the existing code, make sure not to introduce regressions (!!!).
and also describe why this additional functionality should be considered and merged into the Leaflet code
(what functionalities is it achieving, in which user case?)

nwom’s picture

@itamair: This isn't my work. This is a patch based on the php file that @Civette posted (Show hidden files). I have not tested it myself. Just doing my due diligence, and wanted to test it next week. So please direct all of your questions at Civette ;)

Thanks for the feedback though. Now I'll avoid testing it until those problems are solved as well.

nwom’s picture

Deleted (not sure why it posted my comment twice)

nwom’s picture

StatusFileSize
new662 bytes

Ah it looks like Civette mentioned that the changes were referenced only at line 155 according to their description, so the rest of the changes in their file have nothing to do with the Feature Request.

Here is an updated patch in that case. Also to clarify why this feature request makes sense: It lets you create a map based on the vertical height of the viewport, rather than % or px.

Again, I haven't tested the functionality, just porting the work that Civette did into a patch in order to apply via Composer, etc; in order to help others easily test this.

nwom’s picture

Status: Needs work » Needs review

  • itamair committed 36c8994 on 2.1.x authored by NWOM
    Issue #3180537 by NWOM, Civette, itamair: Add vh as a height unit option
    
itamair’s picture

Status: Needs review » Fixed

Committed into dev and deployed as new 2.1.12 release

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.