chrome-extension/js/mobile.js
function getNodeInfo(x, y){
        var nodeInfo = {};
        var bestNodeInfo = {
            node: null,
            boundSize: 0
        };
        getBestNode(appTree, x, y, bestNodeInfo);
        var bestNode = bestNodeInfo.node;
        if(bestNode){
            var text = bestNode.text || bestNode.label;
            if(text){
                text = text.replace(/\s*\r?\n\s*/g,' ');
                text = text.replace(/^\s+|\s+$/g, '');
                var textLen = byteLen(text);
                text = textLen > 20 ? leftstr(text, 20) + '...' : text;
                nodeInfo.text = text;
            }
            nodeInfo.path = getNodeXPath(bestNode);
        }
        else{
            nodeInfo.x = x;
            nodeInfo.y = y;
        }
        return nodeInfo;
    }
function getNodeInfo(x, y){
        var nodeInfo = {};
        var bestNodeInfo = {
            node: null,
            boundSize: 0
        };
        getBestNode(appTree, x, y, bestNodeInfo);
        var bestNode = bestNodeInfo.node;
        if(bestNode){
            var text = bestNode.text || bestNode.label;
            if(text){
                text = text.replace(/\s*\r?\n\s*/g,' ');
                text = text.replace(/^\s+|\s+$/g, '');
                var textLen = byteLen(text);
                text = textLen > 20 ? leftstr(text, 20) + '...' : text;
                nodeInfo.text = text;
            }
            nodeInfo.path = getNodeXPath(bestNode);
        }
        else{
            nodeInfo.x = x;
            nodeInfo.y = y;
        }
        return nodeInfo;
    }
function getNodeInfo ( x , y ) { var nodeInfo = { } ; var bestNodeInfo = { node : null , boundSize : 0 } ; getBestNode ( appTree , x , y , bestNodeInfo ) ; var bestNode = bestNodeInfo . node ; if ( bestNode ) { var text = bestNode . text || bestNode . label ; if ( text ) { text = text . replace ( / \s*\r?\n\s* / g , ' ' ) ; text = text . replace ( / ^\s+|\s+$ / g , '' ) ; var textLen = byteLen ( text ) ; text = textLen > 20 ? leftstr ( text , 20 ) + '...' : text ; nodeInfo . text = text ; } nodeInfo . path = getNodeXPath ( bestNode ) ; } else { nodeInfo . x = x ; nodeInfo . y = y ; } return nodeInfo ; }
get node info by x,y
get node info by x y