<commit_before><link rel="import" href="../polymer/polymer.html">

<!--
`bpmn-viewer`
Display a BPMN2 model

@demo demo/index.html
-->

<dom-module id="bpmn-viewer">
  <template>
    <style>
      :host {
        display: block;
      }
    </style>
    <div id="jscanvas"></div>
  </template>

  <script src="../jquery/dist/jquery.js"></script>
  <script src="../bpmn-js/dist/bpmn-navigated-viewer.js"></script>
  <script>
    Polymer({

      is: 'bpmn-viewer',

      ready: function() {
           // access a local DOM element by ID using this.$
           var BpmnViewer = window.BpmnJS;
           var viewer = new BpmnViewer({ container: this.$.jscanvas, height: 800 });
           var url = this.src;

           $.ajax(url, { dataType : 'text' }).done(function(xml) {

             viewer.importXML(xml, function(err) {

               if (err) {
                 console.error(err);
               } else {
                 viewer.get('canvas').zoom('fit-viewport');
               }
             });
           });

         },
      properties: {
        src: {
          type: String,
          value: 'bpmn-viewer',
        },
      },

    });
<commit_msg>height aus dem Aufruf entfernt<commit_after><link rel="import" href="../polymer/polymer.html">

<!--
`bpmn-viewer`
Display a BPMN2 model

@demo demo/index.html
-->

<dom-module id="bpmn-viewer">
  <template>
    <style>
      :host {
        display: block;
      }
    </style>
    <div id="jscanvas"></div>
  </template>

  <script src="../jquery/dist/jquery.js"></script>
  <script src="../bpmn-js/dist/bpmn-navigated-viewer.js"></script>
  <script>
    Polymer({

      is: 'bpmn-viewer',

      ready: function() {
           // access a local DOM element by ID using this.$
           var BpmnViewer = window.BpmnJS;
           var viewer = new BpmnViewer({ container: this.$.jscanvas });
           var url = this.src;

           $.ajax(url, { dataType : 'text' }).done(function(xml) {

             viewer.importXML(xml, function(err) {

               if (err) {
                 console.error(err);
               } else {
                 viewer.get('canvas').zoom('fit-viewport');
               }
             });
           });

         },
      properties: {
        src: {
          type: String,
          value: 'bpmn-viewer',
        },
      },

    });

{'fraction_non_alphanumeric': 0.1643952299829642, 'fraction_numerical': 0.002129471890971039, 'mean_word_length': 1.6129032258064515, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6047690', 'n_tokens_mistral': 776, 'n_tokens_neox': 748, 'n_words': 144}