提交 ec53b8e4 编写于 作者: M Mario Schuettel

Minor adjustments in editor/docs markdowns

Added "var " before function expressions
上级 08106172
...@@ -26,12 +26,12 @@ Every command needs a constructor. In the constructor ...@@ -26,12 +26,12 @@ Every command needs a constructor. In the constructor
```javascript ```javascript
DoSomethingCommand = function () { var DoSomethingCommand = function () {
Command.call( this ); // Required: Call default constructor Command.call( this ); // Required: Call default constructor
this.type = 'DoSomethingCommand'; // Required: has to match the object-name! this.type = 'DoSomethingCommand'; // Required: has to match the object-name!
this.name = 'Set/Do/Update DoSomething'; // Required: description of the command, used in Sidebar.History this.name = 'Set/Do/Update Something'; // Required: description of the command, used in Sidebar.History
// TODO: store all the relevant information needed to // TODO: store all the relevant information needed to
// restore the old and the new state // restore the old and the new state
......
...@@ -26,9 +26,9 @@ Within the file, go to the `<!-- command object classes -->` and include the new ...@@ -26,9 +26,9 @@ Within the file, go to the `<!-- command object classes -->` and include the new
```html ```html
// <!-- command object classes --> // <!-- command object classes -->
//... //...
<script src="../../editor/js/AddScriptCommand.js"></script> <script src="../../editor/js/commands/AddScriptCommand.js"></script>
<script src="../../editor/js/DoSomethingCommand.js"></script> // add this line <script src="../../editor/js/commands/DoSomethingCommand.js"></script> // add this line
<script src="../../editor/js/MoveObjectCommand.js"></script> <script src="../../editor/js/commands/MoveObjectCommand.js"></script>
//... //...
``` ```
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* @constructor * @constructor
*/ */
Command = function ( editorRef ) { var Command = function ( editorRef ) {
this.id = - 1; this.id = - 1;
this.inMemory = false; this.inMemory = false;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* @constructor * @constructor
*/ */
AddObjectCommand = function ( object ) { var AddObjectCommand = function ( object ) {
Command.call( this ); Command.call( this );
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* @constructor * @constructor
*/ */
AddScriptCommand = function ( object, script ) { var AddScriptCommand = function ( object, script ) {
Command.call( this ); Command.call( this );
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
MoveObjectCommand = function ( object, newParent, newBefore ) { var MoveObjectCommand = function ( object, newParent, newBefore ) {
Command.call( this ); Command.call( this );
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* @constructor * @constructor
*/ */
MultiCmdsCommand = function ( cmdArray ) { var MultiCmdsCommand = function ( cmdArray ) {
Command.call( this ); Command.call( this );
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* @constructor * @constructor
*/ */
RemoveObjectCommand = function ( object ) { var RemoveObjectCommand = function ( object ) {
Command.call( this ); Command.call( this );
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* @constructor * @constructor
*/ */
RemoveScriptCommand = function ( object, script ) { var RemoveScriptCommand = function ( object, script ) {
Command.call( this ); Command.call( this );
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
SetColorCommand = function ( object, attributeName, newValue ) { var SetColorCommand = function ( object, attributeName, newValue ) {
Command.call( this ); Command.call( this );
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* @constructor * @constructor
*/ */
SetGeometryCommand = function ( object, newGeometry ) { var SetGeometryCommand = function ( object, newGeometry ) {
Command.call( this ); Command.call( this );
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
SetGeometryValueCommand = function ( object, attributeName, newValue ) { var SetGeometryValueCommand = function ( object, attributeName, newValue ) {
Command.call( this ); Command.call( this );
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
SetMaterialColorCommand = function ( object, attributeName, newValue ) { var SetMaterialColorCommand = function ( object, attributeName, newValue ) {
Command.call( this ); Command.call( this );
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* @constructor * @constructor
*/ */
SetMaterialCommand = function ( object, newMaterial ) { var SetMaterialCommand = function ( object, newMaterial ) {
Command.call( this ); Command.call( this );
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
SetMaterialMapCommand = function ( object, mapName, newMap ) { var SetMaterialMapCommand = function ( object, mapName, newMap ) {
Command.call( this ); Command.call( this );
this.type = 'SetMaterialMapCommand'; this.type = 'SetMaterialMapCommand';
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
SetMaterialValueCommand = function ( object, attributeName, newValue ) { var SetMaterialValueCommand = function ( object, attributeName, newValue ) {
Command.call( this ); Command.call( this );
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
SetPositionCommand = function ( object, newPosition, optionalOldPosition ) { var SetPositionCommand = function ( object, newPosition, optionalOldPosition ) {
Command.call( this ); Command.call( this );
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
SetRotationCommand = function ( object, newRotation, optionalOldRotation ) { var SetRotationCommand = function ( object, newRotation, optionalOldRotation ) {
Command.call( this ); Command.call( this );
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
SetScaleCommand = function ( object, newScale, optionalOldScale ) { var SetScaleCommand = function ( object, newScale, optionalOldScale ) {
Command.call( this ); Command.call( this );
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* @constructor * @constructor
*/ */
SetSceneCommand = function ( scene ) { var SetSceneCommand = function ( scene ) {
Command.call( this ); Command.call( this );
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* @constructor * @constructor
*/ */
SetScriptValueCommand = function ( object, script, attributeName, newValue, cursorPosition ) { var SetScriptValueCommand = function ( object, script, attributeName, newValue, cursorPosition ) {
Command.call( this ); Command.call( this );
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* @constructor * @constructor
*/ */
SetUuidCommand = function ( object, newUuid ) { var SetUuidCommand = function ( object, newUuid ) {
Command.call( this ); Command.call( this );
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @constructor * @constructor
*/ */
SetValueCommand = function ( object, attributeName, newValue ) { var SetValueCommand = function ( object, attributeName, newValue ) {
Command.call( this ); Command.call( this );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册