小编Man*_*ook的帖子

聚合物这和Cytoscape这个

所以我有一个问题,这很可能是因为我仍然没有得到JavaScript ...... Cytoscape有自己的'this'而且Polymer有'this'

    <div id="labelFld">{{node.label}}</div>
    <div id="measureFld">{{node.measure}}</div>
    <div id="timesignatureFld">{{node.time_signature}}</div>
    <div id="voiceFld">{{node.voice}}</div>
    <div id="beatFld">{{node.beat}}</div>
    <div id="meventFld">{{node.event}}</div>
Run Code Online (Sandbox Code Playgroud)
var cy;
cytoscape({
    ready : function () {
              Polymer: ({
                ...
                        properties : {
                                node : {
                                type : Object,
                                notify : true,
                                readOnly : true
                        }
                },
                ...
Run Code Online (Sandbox Code Playgroud)
// Fires when the local DOM has been fully prepared
ready : function () {
    var self_node = this.node; // <- 'this' via Polymer
    try {
        cy = cytoscape({
                container : this.$.rhythmgraph,
                ready : function (e) …
Run Code Online (Sandbox Code Playgroud)

javascript cytoscape.js polymer

5
推荐指数
1
解决办法
145
查看次数

标签 统计

cytoscape.js ×1

javascript ×1

polymer ×1