Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Unable to specify height of the scroller. #13

@mwinters-stuff

Description

@mwinters-stuff

When using paper-dropdown..

Due to the code that is calculating the size of the dropdown, it always seems to come out with a size of the scroller at 304px. Need to be able to specfify an overriding value for the scroller/dropdown size, I have only 8 items in the list but not all are visible when there is plenty of vertical space.

I am using the code below, the target of the core-dropdown at expansion is some animation...


                <paper-dropdown id="machinesDropdown" class="dropdown" layered>
                  <core-menu id="machinesDropdownMenu" class="menu"  selectedItem="{{selectedMachineTypeItem}}" selected="{{machinetype}}" valueattr="id" >
                    <template repeat="{{machinetype in machinetypes}}">
                      <paper-item id="{{machinetype.id}}" class="listitem" >
                        <div class="listitem">{{machinetype.type}}</listitem>
                      </paper-item>
                    </template>
                  </core-menu>
                </paper-dropdown>

setting the height of the scroller by css, or code is always overwritten by the following in core-dropdown's positionTarget method.

    // explicitly set width/height, because we don't want it constrained
      // to the offsetParent
      var target = this.sizingTarget;
      var rect = this.measure();
      target.style.width = Math.ceil(rect.width) + 'px';
      target.style.height = Math.ceil(rect.height) + 'px';

I would suggest an attribute that allows overriding this width and height, with either removing the width/height style which means the scroller will size to its contents, or allowing some other method to ensure all the contents are visible when there is screen real estate to show it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions