Skip to content

Commit

Permalink
Remove stage methods for enabling/disabling contextMenu. bonsai.run c…
Browse files Browse the repository at this point in the history
…onfiguration is sufficient for now
  • Loading branch information
padolsey committed Oct 4, 2012
1 parent 2d285e1 commit d37c8ae
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 63 deletions.
3 changes: 2 additions & 1 deletion example/library/movies/event-mouse-button.js
@@ -1,6 +1,7 @@
var text = new Text().addTo(stage).attr({x: 10, y: 10});

stage.disableContextMenu();
// NOTE:
// Go to index.html and set disableContextMenu: true

stage.on('pointerup', function(e) {
switch (true) {
Expand Down
26 changes: 0 additions & 26 deletions src/runner/stage.js
Expand Up @@ -443,32 +443,6 @@ define([
});
},

/**
* Disables the native browser context menu (usually activated by right-click)
*/
disableContextMenu: function() {
this.post({
command: 'renderConfig',
data: {
item: 'disableContextMenu',
value: true
}
});
},

/**
* Enables the native browser context menu (usually activated by right-click)
*/
enableContextMenu: function() {
this.post({
command: 'renderConfig',
data: {
item: 'disableContextMenu',
value: false
}
});
},

/**
* Unfreeze/initiate the loop
*/
Expand Down
36 changes: 0 additions & 36 deletions test/stage-spec.js
Expand Up @@ -47,42 +47,6 @@ define([
});
});

describe('disableContextMenu', function() {
var stage = makeStage();
stage.post = jasmine.createSpy('post');
it('Exists', function() {
expect(stage.disableContextMenu).toBeOfType('function');
});
it('Posts disableContextMenu:true to the renderer', function() {
stage.disableContextMenu();
expect(stage.post).toHaveBeenCalledWith({
command: 'renderConfig',
data: {
item: 'disableContextMenu',
value: true
}
})
});
});

describe('enableContextMenu', function() {
var stage = makeStage();
stage.post = jasmine.createSpy('post');
it('Exists', function() {
expect(stage.enableContextMenu).toBeOfType('function');
});
it('Posts enableContextMenu:true to the renderer', function() {
stage.enableContextMenu();
expect(stage.post).toHaveBeenCalledWith({
command: 'renderConfig',
data: {
item: 'disableContextMenu',
value: false
}
})
});
});

describe('getSubMovieEnvironment', function() {
it('returns an Environment instance for a new subMovie', function() {
var subMovie = {};
Expand Down

0 comments on commit d37c8ae

Please sign in to comment.