Skip to content

Commit 7f3acb1

Browse files
committed
Renaming exportdata to export
1 parent 1a6243a commit 7f3acb1

10 files changed

+21
-3145
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ explaining its fields, name and behaviour.
1818

1919
It allow the user to edit the blocks scene.
2020

21-
Then, thanks for instance to the `exportData()`, method, you can get back
21+
Then, thanks for instance to the `export()`, method, you can get back
2222
the edited [scene](#scene). When you load the blocks, you can also load back a scene.
2323

2424
## Using blocks.js

build/blocks.all.js

-3,124
This file was deleted.

build/blocks.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ Connector.prototype.same = function(other)
781781
/**
782782
* Export the connector
783783
*/
784-
Connector.prototype.exportData = function()
784+
Connector.prototype.export = function()
785785
{
786786
var data = [this.name, this.type];
787787

@@ -1024,14 +1024,14 @@ Edge.prototype.same = function(other)
10241024
/**
10251025
* Exports the edge to JSON
10261026
*/
1027-
Edge.prototype.exportData = function()
1027+
Edge.prototype.export = function()
10281028
{
10291029
return {
10301030
id: this.id,
10311031
block1: this.block1.id,
1032-
connector1: this.connector1.exportData(),
1032+
connector1: this.connector1.export(),
10331033
block2: this.block2.id,
1034-
connector2: this.connector2.exportData()
1034+
connector2: this.connector2.export()
10351035
};
10361036
};
10371037

@@ -1363,7 +1363,7 @@ var History = function(blocks)
13631363
*/
13641364
History.prototype.save = function()
13651365
{
1366-
this.history.push(this.blocks.exportData());
1366+
this.history.push(this.blocks.export());
13671367

13681368
if (this.history.length > this.historySize) {
13691369
this.history.shift();
@@ -1924,7 +1924,7 @@ Block.prototype.allSuccessors = function()
19241924
/**
19251925
* Exports the block to JSON
19261926
*/
1927-
Block.prototype.exportData = function()
1927+
Block.prototype.export = function()
19281928
{
19291929
return {
19301930
id: this.id,
@@ -2606,17 +2606,17 @@ Blocks.prototype.toggleCompact = function()
26062606
/**
26072607
* Export the scene
26082608
*/
2609-
Blocks.prototype.exportData = function()
2609+
Blocks.prototype.export = function()
26102610
{
26112611
var blocks = [];
26122612
var edges = [];
26132613

26142614
for (var k in this.blocks) {
2615-
blocks.push(this.blocks[k].exportData());
2615+
blocks.push(this.blocks[k].export());
26162616
}
26172617

26182618
for (var k in this.edges) {
2619-
edges.push(this.edges[k].exportData());
2619+
edges.push(this.edges[k].export());
26202620
}
26212621

26222622
return {

build/blocks.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/demo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
blocks.ready(function() {
3232
blocks.menu.addAction('Export', function(blocks) {
33-
alert($.toJSON(blocks.exportData()));
33+
alert($.toJSON(blocks.export()));
3434
}, 'export');
3535

3636
$('.setLabel').click(function() {

src/block.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ Block.prototype.allSuccessors = function()
540540
/**
541541
* Exports the block to JSON
542542
*/
543-
Block.prototype.exportData = function()
543+
Block.prototype.export = function()
544544
{
545545
return {
546546
id: this.id,

src/blocks.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -622,17 +622,17 @@ Blocks.prototype.toggleCompact = function()
622622
/**
623623
* Export the scene
624624
*/
625-
Blocks.prototype.exportData = function()
625+
Blocks.prototype.export = function()
626626
{
627627
var blocks = [];
628628
var edges = [];
629629

630630
for (var k in this.blocks) {
631-
blocks.push(this.blocks[k].exportData());
631+
blocks.push(this.blocks[k].export());
632632
}
633633

634634
for (var k in this.edges) {
635-
edges.push(this.edges[k].exportData());
635+
edges.push(this.edges[k].export());
636636
}
637637

638638
return {

src/connector.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Connector.prototype.same = function(other)
5252
/**
5353
* Export the connector
5454
*/
55-
Connector.prototype.exportData = function()
55+
Connector.prototype.export = function()
5656
{
5757
var data = [this.name, this.type];
5858

src/edge.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,14 @@ Edge.prototype.same = function(other)
198198
/**
199199
* Exports the edge to JSON
200200
*/
201-
Edge.prototype.exportData = function()
201+
Edge.prototype.export = function()
202202
{
203203
return {
204204
id: this.id,
205205
block1: this.block1.id,
206-
connector1: this.connector1.exportData(),
206+
connector1: this.connector1.export(),
207207
block2: this.block2.id,
208-
connector2: this.connector2.exportData()
208+
connector2: this.connector2.export()
209209
};
210210
};
211211

src/history.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var History = function(blocks)
3636
*/
3737
History.prototype.save = function()
3838
{
39-
this.history.push(this.blocks.exportData());
39+
this.history.push(this.blocks.export());
4040

4141
if (this.history.length > this.historySize) {
4242
this.history.shift();

0 commit comments

Comments
 (0)