Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : can.batch.start callback called too early in can.Map.extend() init?

$
0
0
Ok. I'm didn't mean that you should or shouldn't use setTimeout.
I just want to point out that your code is synchronous and deals with one attribute change there is no diff between your code and:

  1. var self = this
  2. can.batch.start(function(){self._startBatch()})

  3. this.attr("@transition", ...);

  4. can.batch.stop()

or without callback

  1. can.batch.start()

  2. this.attr("@transition", ...);

  3. can.batch.stop()

  4. this._startBatch()
or just without all that stuff with batches.

  1. this.attr("@transition", ...);

  2. this._startBatch()

And you approach to deal with css transitions seems a little too sophisticated.

Viewing all articles
Browse latest Browse all 3491

Trending Articles