googlearchive / core-splitter

A split bar and dragging on it will resize the sibling element
10 stars 12 forks source link

Does not work when surrounded by if-template #13

Open FraBle opened 9 years ago

FraBle commented 9 years ago

I use the core-splitter to dynamically resize two video elements, which are next to each other, with the splitter in between. However, when I want to activate it only under certain conditions (if-template), it will render but not move.

        <template if="{{ true }}">
          <core-splitter direction="left" minSize="200px"></core-splitter>
        </template>
frankiefu commented 9 years ago

This is a bug. But you can use hidden attribute to toggle the visibility of the splitter.

<core-splitter direction="left" minSize="200px" hidden?="{{ !showing }}"></core-splitter>

This is actually better since template if will create/remove the element, and hidden just toggles the display css property.

FraBle commented 9 years ago

Alright, thank you!