File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ var PaperScript = this.PaperScript = new function() {
142142 paper = scope ;
143143 new Project ( ) ;
144144 // Activate the newly created view straight away
145- new ProjectView ( canvas ) . activate ( ) ;
145+ new View ( canvas ) . activate ( ) ;
146146 }
147147 if ( code . src ) {
148148 // If we're loading from a source, request that first and then
Original file line number Diff line number Diff line change @@ -665,7 +665,7 @@ var Item = this.Item = Base.extend({
665665 }
666666 } ,
667667
668- // TODO: Implement ProjectView into the drawing
668+ // TODO: Implement View into the drawing
669669 // TODO: Optimize temporary canvas drawing to ignore parts that are
670670 // outside of the visible view.
671671 draw : function ( item , ctx , param ) {
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ var sources = [
3535 'src/basic/Matrix.js' ,
3636 'src/basic/Line.js' ,
3737
38- 'src/project/ProjectView.js' ,
3938 'src/project/Project.js' ,
4039 'src/project/Symbol.js' ,
4140
@@ -73,6 +72,7 @@ var sources = [
7372 'src/browser/DomElement.js' ,
7473 'src/browser/DomEvent.js' ,
7574
75+ 'src/ui/View.js' ,
7676 'src/ui/Event.js' ,
7777 'src/ui/KeyEvent.js' ,
7878 'src/ui/Key.js' ,
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ var paper = new function() {
5252//#include "basic/Matrix.js"
5353//#include "basic/Line.js"
5454
55- //#include "project/ProjectView.js"
5655//#include "project/Project.js"
5756//#include "project/Symbol.js"
5857
@@ -93,6 +92,7 @@ var paper = new function() {
9392//#include "browser/DomElement.js"
9493//#include "browser/DomEvent.js"
9594
95+ //#include "ui/View.js"
9696//#include "ui/Event.js"
9797//#include "ui/KeyEvent.js"
9898//#include "ui/Key.js"
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ var Key = this.Key = new function() {
6565 var character = String . fromCharCode ( charCode ) ,
6666 key = keys [ keyCode ] || character . toLowerCase ( ) ,
6767 handler = down ? 'onKeyDown' : 'onKeyUp' ,
68- scope = ProjectView . focused && ProjectView . focused . _scope ,
68+ scope = View . focused && View . focused . _scope ,
6969 tool = scope && scope . tool ;
7070 keyMap [ key ] = down ;
7171 if ( tool && tool [ handler ] ) {
Original file line number Diff line number Diff line change 1414 * All rights reserved.
1515 */
1616
17- var ProjectView = this . ProjectView = Base . extend ( {
17+ var View = this . View = Base . extend ( {
1818 beans : true ,
1919
2020 // TODO: Add bounds parameter that defines position within canvas?
@@ -84,8 +84,8 @@ var ProjectView = this.ProjectView = Base.extend({
8484 this . _events = this . _createEvents ( ) ;
8585 DomEvent . add ( this . _canvas , this . _events ) ;
8686 // Make sure the first view is focused for keyboard input straight away
87- if ( ! ProjectView . focused )
88- ProjectView . focused = this ;
87+ if ( ! View . focused )
88+ View . focused = this ;
8989 } ,
9090
9191 getViewBounds : function ( ) {
@@ -273,7 +273,7 @@ var ProjectView = this.ProjectView = Base.extend({
273273
274274 function mousedown ( event ) {
275275 // Tell the Key class which view should receive keyboard input.
276- ProjectView . focused = that ;
276+ View . focused = that ;
277277 if ( ! ( tool = that . _scope . tool ) )
278278 return ;
279279 curPoint = viewToArtwork ( event ) ;
You can’t perform that action at this time.
0 commit comments