def svg_repr(self):
        """Return svg group element representing widget.

        Overrides Object2D.svg_repr().
        """
        line = self.cursor.line
        line.rect.topleft = self.rect.topleft

        text = "".join(obj.text for obj in line.get_colliding(self.rect))

        rect = self.rect

        x_str, y_str, width_str, height_str = map(str, rect)

        ###

        group = Element("g", {"class": "string_entry"})

        group.append(
            Element(
                "rect",
                {
                    "x": x_str,
                    "y": y_str,
                    "width": width_str,
                    "height": height_str,
                },
            )
        )

        (
            text_x_str,
            text_y_str,
        ) = map(str, rect.move(0, -3).bottomleft)

        text_element = Element(
            "text",
            {
                "x": text_x_str,
                "y": text_y_str,
                "text-anchor": "start",
            },
        )

        text_element.text = text

        group.append(text_element)

        return group
Return svg group element representing widget.

        Overrides Object2D.svg_repr().
        
nodezator/widget/stringentry.py