Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                    <body>
        <div style:"text-align: center;">
          <textarea id="code" style="width: 100%;display:none;" rows="11">
renter_0=>operation: 没住过
renter_1=>operation: 面试申请者啦
renter_2=>parallel: 面试通过
暂时搬不过来的话
需要先交定金
renter_3=>operation: 已支付定金
保留床位
renter_4=>operation: 现住客
renter_6=>operation: 曾住客

action_0=>subroutine: 申请面试
action_1=>subroutine: 定金支付|clickable:>http://lifelab-space.mikecrm.com/q7vetg2
action_2=>subroutine: 退宿
享有400元送别资金|clickable:>http://lifelab-space.mikecrm.com/Sp7bZiA
action_3=>subroutine: 延期
action_4=>subroutine: 房租及租金缴纳完毕|clickable:>http://lifelab-space.mikecrm.com/xperQLK
action_5=>subroutine: 面试
          
action_6=>condition: 投票

renter_0->action_0
action_0->renter_1
renter_1->action_5
action_5->renter_2
renter_2(path1,right)->action_1
renter_2(path2,bottom)->action_4
action_1->renter_3
renter_3(left)->action_4
action_4->renter_4
renter_4->action_3
action_3->renter_4
renter_4->action_2
action_2->renter_6
renter_6(right)->action_6
action_6(yes,top)->renter_2
action_6(no,right)->action_5
          </textarea></div>
        <div style="display:none;"><button id="run" type="button">Run</button></div>
      <div style="text-align: center;">
        <h2>我是谁,我在哪,我需要作什么</h2>
        <div id="canvas" ></div>
      </div>
    </body>
              
            
!

CSS

              
                
              
            
!

JS

              
                window.onload = function() {
  var btn = document.getElementById("run"),
    cd = document.getElementById("code"),
    chart;
  (btn.onclick = function() {
    var code = cd.value;
    if (chart) {
      chart.clean();
    }
    chart = flowchart.parse(code);
    chart.drawSVG('canvas', {
      // 'x': 30,
      // 'y': 50,
      'line-width': 3,
      'maxWidth': 3, //ensures the flowcharts fits within a certian width
      'line-length': 50,
      'text-margin': 10,
      'font-size': 14,
      'font': 'normal',
      'font-family': 'Helvetica',
      'font-weight': 'normal',
      'font-color': 'black',
      'line-color': 'black',
      'element-color': 'black',
      'fill': 'white',
      'yes-text': 'yes',
      'no-text': 'no',
      'arrow-end': 'block',
      'scale': 1,
      'symbols': {
        'start': {
          'font-color': 'red',
          'element-color': 'green',
        },
        'end': {
          'class': 'end-element'
        }
      },
      'flowstate': {
        'clickable':{ 'fill' : '#52bffa'},'delay' : {'arrow-text' : '暂时无法搬过来,先面试了' }
        ,'now' : {'arrow-text' : '我现在就能住进来' }
      }
    });
    $('[id^=sub1]').click(function() {
      alert('info here');
    });
  })();
};

function myFunction(event, node) {
  console.log("You just clicked this node:", node);
}

              
            
!
999px

Console