4

我在 Eclipse 折叠 javascript 代码时遇到问题,我不知道问题是什么。我正在构建游戏引擎,所以我有一个特定的对象构造函数,后跟一个计算帧速率的函数:

function Constructor() {
    //A whole bunch of code for this constructor

    this.method = function() {
        //A bunch of method code
        this.context.font = "blahblah";
    };
}

function calculateFrameRate(times) {
    //All the code for calculating framerate
}

无论出于何种原因,它都让我可以选择从 context.font 语句开始折叠,并在帧率计算函数中一直折叠。这显然不是要折叠的有效代码块。关于问题可能是什么的任何想法?

4

1 回答 1

0

尝试将函数命名this.method = function() {this.method = function method() {

于 2015-06-16T17:35:14.333 回答