diff --git a/src/Canvas.js b/src/Canvas.js index 11d93784..790f6ab1 100644 --- a/src/Canvas.js +++ b/src/Canvas.js @@ -423,13 +423,4 @@ }; Kinetic.Global.extend(Kinetic.HitCanvas, Kinetic.Canvas2D); - Kinetic.GenericCanvas = function(config) { - Kinetic.Canvas.call(this, config); - }; - - Kinetic.GenericCanvas.prototype = { - clear: function() {} - }; - - Kinetic.Global.extend(Kinetic.GenericCanvas, Kinetic.Canvas); })(); diff --git a/src/Layer.js b/src/Layer.js index a0918801..e21b59f6 100644 --- a/src/Layer.js +++ b/src/Layer.js @@ -16,22 +16,12 @@ Kinetic.Layer.prototype = { _initLayer: function(config) { - var contextType = ''; this.nodeType = 'Layer'; this.createAttrs(); // call super constructor Kinetic.Container.call(this, config); - contextType = this.getContextType(); - if (contextType === '2d') { - this.canvas = new Kinetic.SceneCanvas(); - } - else { - this.canvas = new Kinetic.GenericCanvas({ - contextType: contextType - }); - } - + this.canvas = new Kinetic.SceneCanvas(); this.canvas.getElement().style.position = 'absolute'; this.hitCanvas = new Kinetic.HitCanvas(); }, @@ -222,7 +212,6 @@ // add getters and setters Kinetic.Node.addGetterSetter(Kinetic.Layer, 'clearBeforeDraw', true); - Kinetic.Node.addGetterSetter(Kinetic.Layer, 'contextType', '2d'); /** * set flag which determines if the layer is cleared or not diff --git a/tests/html/unitTests.html b/tests/html/unitTests.html index 34508f7a..51de7a7c 100644 --- a/tests/html/unitTests.html +++ b/tests/html/unitTests.html @@ -3,6 +3,7 @@ + diff --git a/tests/js/unit/layerTests.js b/tests/js/unit/layerTests.js index a669879a..2342a94a 100644 --- a/tests/js/unit/layerTests.js +++ b/tests/js/unit/layerTests.js @@ -28,24 +28,7 @@ Test.Modules.LAYER = { test(style.padding === '0px', 'canvas padding style should be 0px'); test(style.backgroundColor === 'transparent', 'canvas backgroundColor style should be transparent'); }, - 'webgl context type': function(containerId) { - var stage = new Kinetic.Stage({ - container: containerId, - width: 578, - height: 200 - }); - var layer = new Kinetic.Layer({ - contextType: 'experimental-webgl' - }); - - - stage.add(layer); - - test(layer.getContextType() === 'experimental-webgl', 'context type should be experimental-webgl'); - - - }, 'layer getIntersections()': function(containerId) { var stage = new Kinetic.Stage({ container: containerId,