How to use the branca.utilities._parse_size function in branca

To help you get started, we’ve selected a few branca examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github python-visualization / branca / branca / element.py View on Github external
def __init__(self, width='100%', height='100%',
                 left='0%', top='0%', position='relative'):
        super(Figure, self).__init__()
        self._name = 'Div'

        # Size Parameters.
        self.width = _parse_size(width)
        self.height = _parse_size(height)
        self.left = _parse_size(left)
        self.top = _parse_size(top)
        self.position = position

        self.header = Element()
        self.html = Element(
            '{% for name, element in this._children.items() %}'
            '{{element.render(**kwargs)}}'
            '{% endfor %}'
            )
        self.script = Element()

        self.header._parent = self
        self.html._parent = self
        self.script._parent = self
github python-visualization / branca / branca / element.py View on Github external
def __init__(self, width='100%', height='100%',
                 left='0%', top='0%', position='relative'):
        super(Figure, self).__init__()
        self._name = 'Div'

        # Size Parameters.
        self.width = _parse_size(width)
        self.height = _parse_size(height)
        self.left = _parse_size(left)
        self.top = _parse_size(top)
        self.position = position

        self.header = Element()
        self.html = Element(
            '{% for name, element in this._children.items() %}'
            '{{element.render(**kwargs)}}'
            '{% endfor %}'
            )
        self.script = Element()

        self.header._parent = self
        self.html._parent = self
        self.script._parent = self
github python-visualization / branca / branca / element.py View on Github external
def __init__(self, width='100%', height='100%',
                 left='0%', top='0%', position='relative'):
        super(Figure, self).__init__()
        self._name = 'Div'

        # Size Parameters.
        self.width = _parse_size(width)
        self.height = _parse_size(height)
        self.left = _parse_size(left)
        self.top = _parse_size(top)
        self.position = position

        self.header = Element()
        self.html = Element(
            '{% for name, element in this._children.items() %}'
            '{{element.render(**kwargs)}}'
            '{% endfor %}'
            )
        self.script = Element()

        self.header._parent = self
        self.html._parent = self
        self.script._parent = self
github python-visualization / branca / branca / element.py View on Github external
def __init__(self, data, script=False, width='100%', height='100%'):
        super(Html, self).__init__()
        self._name = 'Html'
        self.script = script
        self.data = data

        self.width = _parse_size(width)
        self.height = _parse_size(height)