{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Python Code" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import ipywidgets.widgets as widgets\n", "from traitlets import Unicode, Dict, List\n", "from random import randint\n", "\n", "class PolygonSelector(widgets.DOMWidget):\n", " _view_name = Unicode('PolygonSelectorView').tag(sync=True)\n", " _view_module = Unicode('polygonselector').tag(sync=True)\n", " groups_dict = Dict().tag(sync=True)\n", " current_list = List().tag(sync=True)\n", " content = Unicode().tag(sync=True)\n", "\n", " html_template = '''\n", " \n", " \n", " \n", " \n", "