{% extends "admin/change_form.html" %}

{% block after_field_sets %}

{% if original.pk and original.vtp_data %}

<style>
  .wrapper {
    position: relative;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }
</style>

<div class="wrapper" style="width: 100%; height: 500px;">
  {% include 'rgd_3d/_include/vtkjs_viewer.html' %}

  <script>
    load(vtkContainer, `{% url 'mesh-3d-base64' original.id %}`)
  </script>
</div>

{% endif %}

{% endblock %}
