猿问

(direction == "x" ? visualWidth : visualHeight) * proportion;帮我解读一下这怎么算的。

var visualWidth=container.width();

var visualHeight=container.height();

function calculateDist(direction, proportion) {

    return (direction == "x" ?

        visualWidth : visualHeight) * proportion;

}


凯哥哥Kay
浏览 1625回答 1
1回答
随时随地看视频慕课网APP
我要回答