mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
jsdoc template: rename Code#format and PaperScript#format to #setup.
This commit is contained in:
parent
5c88bdfac9
commit
082ecf1a64
1 changed files with 9 additions and 9 deletions
|
@ -14,14 +14,14 @@ Code = HtmlElement.extend({
|
|||
_class: 'code',
|
||||
|
||||
initialize: function() {
|
||||
// Only format this element if it is visible, otherwise wait until
|
||||
// it is made visible and then call format() manually.
|
||||
if (this.getBounds().height != 0) {
|
||||
this.format();
|
||||
this.setup();
|
||||
}
|
||||
},
|
||||
|
||||
format: function() {
|
||||
// Only setup this element if it is visible, otherwise wait until
|
||||
// it is made visible and then call setup() manually.
|
||||
setup: function() {
|
||||
var that = this;
|
||||
var start = this.getProperty('start');
|
||||
var highlight = this.getProperty('highlight');
|
||||
|
@ -56,14 +56,14 @@ PaperScript = HtmlElement.extend({
|
|||
_class: 'paperscript',
|
||||
|
||||
initialize: function() {
|
||||
// Only format this element if it is visible, otherwise wait until
|
||||
// it is made visible and then call format() manually.
|
||||
// Only setup this element if it is visible, otherwise wait until
|
||||
// it is made visible and then call setup() manually.
|
||||
if (this.getBounds().height != 0) {
|
||||
this.format();
|
||||
this.setup();
|
||||
}
|
||||
},
|
||||
|
||||
format: function() {
|
||||
setup: function() {
|
||||
var script = $('script', this),
|
||||
button = $('.button', this);
|
||||
if (!script || !button)
|
||||
|
@ -194,7 +194,7 @@ function toggleMember(id, scrollTo) {
|
|||
desc.modifyClass('hidden', !v);
|
||||
if (!desc.editor && v) {
|
||||
desc.editor = $$('pre.code, .paperscript', desc).each(function(code) {
|
||||
code.format();
|
||||
code.setup();
|
||||
});
|
||||
}
|
||||
if (scrollTo)
|
||||
|
|
Loading…
Reference in a new issue