提交 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
```javascript
DoSomethingCommand = function () {
var DoSomethingCommand = function () {
Command.call( this ); // Required: Call default constructor
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
// restore the old and the new state
......
......@@ -26,9 +26,9 @@ Within the file, go to the `<!-- command object classes -->` and include the new
```html
// <!-- command object classes -->
//...
<script src="../../editor/js/AddScriptCommand.js"></script>
<script src="../../editor/js/DoSomethingCommand.js"></script> // add this line
<script src="../../editor/js/MoveObjectCommand.js"></script>
<script src="../../editor/js/commands/AddScriptCommand.js"></script>
<script src="../../editor/js/commands/DoSomethingCommand.js"></script> // add this line
<script src="../../editor/js/commands/MoveObjectCommand.js"></script>
//...
```
......
......@@ -9,7 +9,7 @@
* @constructor
*/
Command = function ( editorRef ) {
var Command = function ( editorRef ) {
this.id = - 1;
this.inMemory = false;
......
......@@ -8,7 +8,7 @@
* @constructor
*/
AddObjectCommand = function ( object ) {
var AddObjectCommand = function ( object ) {
Command.call( this );
......
......@@ -9,7 +9,7 @@
* @constructor
*/
AddScriptCommand = function ( object, script ) {
var AddScriptCommand = function ( object, script ) {
Command.call( this );
......
......@@ -10,7 +10,7 @@
* @constructor
*/
MoveObjectCommand = function ( object, newParent, newBefore ) {
var MoveObjectCommand = function ( object, newParent, newBefore ) {
Command.call( this );
......
......@@ -8,7 +8,7 @@
* @constructor
*/
MultiCmdsCommand = function ( cmdArray ) {
var MultiCmdsCommand = function ( cmdArray ) {
Command.call( this );
......
......@@ -8,7 +8,7 @@
* @constructor
*/
RemoveObjectCommand = function ( object ) {
var RemoveObjectCommand = function ( object ) {
Command.call( this );
......
......@@ -9,7 +9,7 @@
* @constructor
*/
RemoveScriptCommand = function ( object, script ) {
var RemoveScriptCommand = function ( object, script ) {
Command.call( this );
......
......@@ -10,7 +10,7 @@
* @constructor
*/
SetColorCommand = function ( object, attributeName, newValue ) {
var SetColorCommand = function ( object, attributeName, newValue ) {
Command.call( this );
......
......@@ -9,7 +9,7 @@
* @constructor
*/
SetGeometryCommand = function ( object, newGeometry ) {
var SetGeometryCommand = function ( object, newGeometry ) {
Command.call( this );
......
......@@ -10,7 +10,7 @@
* @constructor
*/
SetGeometryValueCommand = function ( object, attributeName, newValue ) {
var SetGeometryValueCommand = function ( object, attributeName, newValue ) {
Command.call( this );
......
......@@ -10,7 +10,7 @@
* @constructor
*/
SetMaterialColorCommand = function ( object, attributeName, newValue ) {
var SetMaterialColorCommand = function ( object, attributeName, newValue ) {
Command.call( this );
......
......@@ -9,7 +9,7 @@
* @constructor
*/
SetMaterialCommand = function ( object, newMaterial ) {
var SetMaterialCommand = function ( object, newMaterial ) {
Command.call( this );
......
......@@ -10,7 +10,7 @@
* @constructor
*/
SetMaterialMapCommand = function ( object, mapName, newMap ) {
var SetMaterialMapCommand = function ( object, mapName, newMap ) {
Command.call( this );
this.type = 'SetMaterialMapCommand';
......
......@@ -10,7 +10,7 @@
* @constructor
*/
SetMaterialValueCommand = function ( object, attributeName, newValue ) {
var SetMaterialValueCommand = function ( object, attributeName, newValue ) {
Command.call( this );
......
......@@ -10,7 +10,7 @@
* @constructor
*/
SetPositionCommand = function ( object, newPosition, optionalOldPosition ) {
var SetPositionCommand = function ( object, newPosition, optionalOldPosition ) {
Command.call( this );
......
......@@ -10,7 +10,7 @@
* @constructor
*/
SetRotationCommand = function ( object, newRotation, optionalOldRotation ) {
var SetRotationCommand = function ( object, newRotation, optionalOldRotation ) {
Command.call( this );
......
......@@ -10,7 +10,7 @@
* @constructor
*/
SetScaleCommand = function ( object, newScale, optionalOldScale ) {
var SetScaleCommand = function ( object, newScale, optionalOldScale ) {
Command.call( this );
......
......@@ -8,7 +8,7 @@
* @constructor
*/
SetSceneCommand = function ( scene ) {
var SetSceneCommand = function ( scene ) {
Command.call( this );
......
......@@ -12,7 +12,7 @@
* @constructor
*/
SetScriptValueCommand = function ( object, script, attributeName, newValue, cursorPosition ) {
var SetScriptValueCommand = function ( object, script, attributeName, newValue, cursorPosition ) {
Command.call( this );
......
......@@ -9,7 +9,7 @@
* @constructor
*/
SetUuidCommand = function ( object, newUuid ) {
var SetUuidCommand = function ( object, newUuid ) {
Command.call( this );
......
......@@ -10,7 +10,7 @@
* @constructor
*/
SetValueCommand = function ( object, attributeName, newValue ) {
var SetValueCommand = function ( object, attributeName, newValue ) {
Command.call( this );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册