Due to Javascript don’t need to have semicolon at end of statement there are times when the parser thinks the line continues on the next line.
For example we have a file.js:
var f = function(x)
{
return x + x;
}
Now in another file we do:
#include file.js
(function(exports) {
a = 42;
})(exports.b)
There will be two different behaviors if the ’file.js’ has a semicolon at the end of the last line. This commit make sure we have the right behavior.
It is polluting the global namespace.
Seven years ago this line was added and even then the variable wasn't
being used but it was a local variable so would have been hard to spot
unless a linter should catch things like that.
Then some four years ago it was accidently converted to a global
variable because the line above it ended in a semicolon rather than
a comma. 'use strict' didn't exist at the time this file was created
and hasn't been added in general yet.
This line of code was introduced years ago with a variable that
javascript is happy to add to the global name space. Clearly it
was meant as a local variable. Probably a cut and paste error
because other places in the code use the same syntax but there the
value is a local because the var statement for it appeared elsewhere
in the function.
Once code like this is cleaned up to use the new 'let' construct,
as well as 'use strict', mistakes like this will be much less likely
to go uncaught.
A long standing bug that never mattered because each class is
initialized with a protocol_list set to an empty array. This
is not the case for the protocol objects but there the syntax
was correct already.
Reason: • consistency : animations handled by animator.
• Views can now animate several DOM elements. For example
a view with a nine part image need to animate its sub divs.
• Do not create any css animation when the start and end values are
equal and there is no intermediate values.
+ This commit adds an optional method to CPView
- (CGRect)frameRectOfView:(CPView)aView inSuperviewSize:(CGSize)aSize
Returns the frame of a view given its superview frame. This will allow
views implementing -layoutSubviews to gain an optional declarative
layout. The animation system will use this method to compute the end
value of an animation.
If _titlePosition is correctly set to CPNoTitle value, class already handles removing title view from display.
Previously, _titlePosition was not correctly set, title view was left in place.
With no supplied value for title, outline of title view was rendered with visible artifacts.