From ff74ecd7c9720c385ed77465da79e9e931d40ffa Mon Sep 17 00:00:00 2001
From: Florian Rival
Date: Sat, 16 Dec 2017 14:26:05 +0100
Subject: [PATCH] Run prettier on newIDE codebase
---
.../src/BehaviorsEditor/NewBehaviorDialog.js | 7 ++-
.../CreateTree.js | 28 +++++-----
.../EnumerateExpressions.js | 26 +++++-----
.../EnumerateInstructions.spec.js | 2 +-
.../InstructionOrExpressionSelector/index.js | 4 +-
.../ExpressionParametersEditorDialog.js | 7 ++-
.../FormatExpressionCall.spec.js | 11 ++--
.../src/EventsSheet/Renderers/LinkEvent.js | 18 ++++---
newIDE/app/src/EventsSheet/index.js | 21 ++++----
.../src/Export/BrowserS3PreviewLauncher.js | 5 +-
newIDE/app/src/Export/LocalPreviewLauncher.js | 5 +-
.../src/InstancesEditor/ScrollbarContainer.js | 8 ++-
newIDE/app/src/InstancesEditor/index.js | 9 +++-
.../app/src/MainFrame/ConfirmCloseDialog.js | 5 +-
newIDE/app/src/MainFrame/EditorTabsHandler.js | 2 +-
newIDE/app/src/MainFrame/Editors/StartPage.js | 52 ++++++++++++-------
.../SpriteEditor/PointsEditor/index.js | 23 ++++----
.../SpriteEditor/PointsEditor/styles.js | 30 +++++------
.../src/ObjectEditor/ObjectEditorDialog.js | 6 ++-
.../src/ObjectEditor/ObjectsEditorService.js | 10 ++--
.../ObjectsGroupEditorDialog.js | 1 -
.../src/ObjectsList/EnumerateObjects.spec.js | 12 +++--
.../ResourcesEditor/BrowserResourceSources.js | 16 +++---
.../src/ResourcesEditor/ResourceSelector.js | 4 +-
.../SceneEditor/InstancesFullEditor/index.js | 13 +++--
newIDE/app/src/UI/EditorMosaic/index.js | 3 +-
newIDE/app/src/UI/HelpIcon/index.js | 4 +-
newIDE/app/src/UI/LocalFolderPicker/index.js | 2 +-
newIDE/app/src/UI/ToolbarIcon.js | 8 +--
newIDE/app/src/Utils/FuzzyOrEmptyFilter.js | 2 +-
newIDE/app/src/Utils/History.js | 19 ++++---
newIDE/app/src/fixtures/TestProject.js | 43 ++++++++-------
newIDE/app/src/stories/ValueStateHolder.js | 6 +--
newIDE/app/src/stories/index.js | 7 ++-
34 files changed, 251 insertions(+), 168 deletions(-)
diff --git a/newIDE/app/src/BehaviorsEditor/NewBehaviorDialog.js b/newIDE/app/src/BehaviorsEditor/NewBehaviorDialog.js
index 451b551c6d..5307f239c7 100644
--- a/newIDE/app/src/BehaviorsEditor/NewBehaviorDialog.js
+++ b/newIDE/app/src/BehaviorsEditor/NewBehaviorDialog.js
@@ -65,7 +65,12 @@ export default class NewBehaviorDialog extends Component {
if (!open || !project) return null;
const actions = [
- ,
+ ,
];
return (
diff --git a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/CreateTree.js b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/CreateTree.js
index f6f11d65dc..7443da3ce3 100644
--- a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/CreateTree.js
+++ b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/CreateTree.js
@@ -15,19 +15,21 @@ export const createTree = (
allExpressions: Array
): InstructionOrExpressionTreeNode => {
const tree = {};
- allExpressions.forEach((expressionInfo: InstructionOrExpressionInformation) => {
- update(
- tree,
- compact(expressionInfo.fullGroupName.split(GROUP_DELIMITER)),
- groupInfo => {
- const existingGroupInfo = groupInfo || {};
- return {
- ...existingGroupInfo,
- [expressionInfo.displayedName]: expressionInfo,
- };
- }
- );
- });
+ allExpressions.forEach(
+ (expressionInfo: InstructionOrExpressionInformation) => {
+ update(
+ tree,
+ compact(expressionInfo.fullGroupName.split(GROUP_DELIMITER)),
+ groupInfo => {
+ const existingGroupInfo = groupInfo || {};
+ return {
+ ...existingGroupInfo,
+ [expressionInfo.displayedName]: expressionInfo,
+ };
+ }
+ );
+ }
+ );
return tree;
};
diff --git a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/EnumerateExpressions.js b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/EnumerateExpressions.js
index f393a544d2..cdeb0bb15c 100644
--- a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/EnumerateExpressions.js
+++ b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/EnumerateExpressions.js
@@ -50,7 +50,7 @@ const enumerateExtensionExpressions = (
return allExpressions;
};
-export const enumerateExpressions = (type) => {
+export const enumerateExpressions = type => {
const freeExpressions = [];
const objectsExpressions = [];
const behaviorsExpressions = [];
@@ -85,7 +85,10 @@ export const enumerateExpressions = (type) => {
//Free expressions
freeExpressions.push.apply(
freeExpressions,
- enumerateExtensionExpressions(prefix, allFreeExpressionsGetter.call(extension))
+ enumerateExtensionExpressions(
+ prefix,
+ allFreeExpressionsGetter.call(extension)
+ )
);
//Objects expressions:
@@ -134,14 +137,13 @@ export const enumerateExpressions = (type) => {
};
export const filterExpressions = (list, searchText) => {
- if (!searchText) return list;
- const lowercaseSearchText = searchText.toLowerCase();
+ if (!searchText) return list;
+ const lowercaseSearchText = searchText.toLowerCase();
- return list.filter(enumeratedExpression => {
- return (
- enumeratedExpression.type
- .toLowerCase()
- .indexOf(lowercaseSearchText) !== -1
- );
- });
-}
+ return list.filter(enumeratedExpression => {
+ return (
+ enumeratedExpression.type.toLowerCase().indexOf(lowercaseSearchText) !==
+ -1
+ );
+ });
+};
diff --git a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/EnumerateInstructions.spec.js b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/EnumerateInstructions.spec.js
index d05b2838f7..b71b5e9054 100644
--- a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/EnumerateInstructions.spec.js
+++ b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/EnumerateInstructions.spec.js
@@ -15,5 +15,5 @@ describe('EnumerateInstructions', () => {
it('can create the tree of instructions', () => {
const instructions = enumerateInstructions('number');
expect(createTree(instructions)).toMatchSnapshot();
- })
+ });
});
diff --git a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/index.js b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/index.js
index 696d35a5f5..e47d64c824 100644
--- a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/index.js
+++ b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionOrExpressionSelector/index.js
@@ -121,9 +121,7 @@ export class InstructionOrExpressionSelector extends Component {
style={styles.searchBar}
ref={searchBar => (this._searchBar = searchBar)}
/>
-
+
{this.state.search
? this._renderSearchResults()
: this._renderTree(this.props.instructionsInfoTree)}
diff --git a/newIDE/app/src/EventsSheet/InstructionEditor/ParameterFields/GenericExpressionField/ExpressionParametersEditorDialog.js b/newIDE/app/src/EventsSheet/InstructionEditor/ParameterFields/GenericExpressionField/ExpressionParametersEditorDialog.js
index 0e91f7c26e..160f863934 100644
--- a/newIDE/app/src/EventsSheet/InstructionEditor/ParameterFields/GenericExpressionField/ExpressionParametersEditorDialog.js
+++ b/newIDE/app/src/EventsSheet/InstructionEditor/ParameterFields/GenericExpressionField/ExpressionParametersEditorDialog.js
@@ -37,7 +37,12 @@ export default class ExpressionParametersEditorDialog extends Component<
}
render() {
- const { project, layout, expressionMetadata, parameterRenderingService } = this.props;
+ const {
+ project,
+ layout,
+ expressionMetadata,
+ parameterRenderingService,
+ } = this.props;
return (
- {!project && canOpen && (
+ {!project &&
+ canOpen && (
+
+ )}
+ {!project && (
+ )}
+ {!!project && (
+
+ )}
+ {!!project && (
+
)}
- {!project && ()}
- {!!project && ()}
- {!!project && ()}
diff --git a/newIDE/app/src/ObjectEditor/Editors/SpriteEditor/PointsEditor/index.js b/newIDE/app/src/ObjectEditor/Editors/SpriteEditor/PointsEditor/index.js
index 9a3ab4a25c..1c9fbbe2de 100644
--- a/newIDE/app/src/ObjectEditor/Editors/SpriteEditor/PointsEditor/index.js
+++ b/newIDE/app/src/ObjectEditor/Editors/SpriteEditor/PointsEditor/index.js
@@ -174,13 +174,13 @@ export default class PointsEditor extends Component {
return (
-
- {hasValidSprite && }
-
+
+ {hasValidSprite && }
+
{mapFor(0, direction.getSpritesCount(), i => {
return (
-
+
);
})}
@@ -247,7 +251,8 @@ export default class PointsEditor extends Component {
label="Share same points for all sprites of the animation"
labelPosition="right"
toggled={samePointsForSprites}
- onToggle={(e, checked) => this._onToggleSamePointsForSprites(checked)}
+ onToggle={(e, checked) =>
+ this._onToggleSamePointsForSprites(checked)}
/>
diff --git a/newIDE/app/src/ObjectEditor/Editors/SpriteEditor/PointsEditor/styles.js b/newIDE/app/src/ObjectEditor/Editors/SpriteEditor/PointsEditor/styles.js
index ba57cafb16..318c14656f 100644
--- a/newIDE/app/src/ObjectEditor/Editors/SpriteEditor/PointsEditor/styles.js
+++ b/newIDE/app/src/ObjectEditor/Editors/SpriteEditor/PointsEditor/styles.js
@@ -1,17 +1,17 @@
//TODO: Factor with styles.js from LayersList.
export default {
- handleColumn: {
- width: 24,
- paddingLeft: 8,
- paddingRight: 0,
- },
- coordinateColumn: {
- width: 48,
- },
- toolColumn: {
- width: 48,
- },
- pointRow: {
- backgroundColor: 'white',
- }
- };
+ handleColumn: {
+ width: 24,
+ paddingLeft: 8,
+ paddingRight: 0,
+ },
+ coordinateColumn: {
+ width: 48,
+ },
+ toolColumn: {
+ width: 48,
+ },
+ pointRow: {
+ backgroundColor: 'white',
+ },
+};
diff --git a/newIDE/app/src/ObjectEditor/ObjectEditorDialog.js b/newIDE/app/src/ObjectEditor/ObjectEditorDialog.js
index 9d1acc3f10..0c06b93840 100644
--- a/newIDE/app/src/ObjectEditor/ObjectEditorDialog.js
+++ b/newIDE/app/src/ObjectEditor/ObjectEditorDialog.js
@@ -31,7 +31,11 @@ export class ObjectEditorDialog extends Component<*, StateType> {
render() {
const actions = [
-
,
+
,
new gd.SpriteObject(''),
castToObjectType: object => gd.asSpriteObject(object),
- helpPagePath: "/objects/sprite",
+ helpPagePath: '/objects/sprite',
},
'TiledSpriteObject::TiledSprite': {
component: TiledSpriteEditor,
newObjectCreator: () => new gd.TiledSpriteObject(''),
castToObjectType: object => gd.asTiledSpriteObject(object),
- helpPagePath: "/objects/tiled_sprite",
+ helpPagePath: '/objects/tiled_sprite',
},
'PanelSpriteObject::PanelSprite': {
component: PanelSpriteEditor,
@@ -41,19 +41,19 @@ export default {
component: TextEditor,
newObjectCreator: () => new gd.TextObject(''),
castToObjectType: object => gd.asTextObject(object),
- helpPagePath: "/objects/text",
+ helpPagePath: '/objects/text',
},
'PrimitiveDrawing::Drawer': {
component: ShapePainterEditor,
newObjectCreator: () => new gd.ShapePainterObject(''),
castToObjectType: object => gd.asShapePainterObject(object),
- helpPagePath: "/objects/shape_painter",
+ helpPagePath: '/objects/shape_painter',
},
'TextEntryObject::TextEntry': {
component: EmptyEditor,
newObjectCreator: () => new gd.TextEntryObject(''),
castToObjectType: object => gd.asTextEntryObject(object),
- helpPagePath: "/objects/text_entry",
+ helpPagePath: '/objects/text_entry',
},
},
};
diff --git a/newIDE/app/src/ObjectsGroupEditor/ObjectsGroupEditorDialog.js b/newIDE/app/src/ObjectsGroupEditor/ObjectsGroupEditorDialog.js
index 9c639c6f96..1b9cd63d95 100644
--- a/newIDE/app/src/ObjectsGroupEditor/ObjectsGroupEditorDialog.js
+++ b/newIDE/app/src/ObjectsGroupEditor/ObjectsGroupEditorDialog.js
@@ -45,7 +45,6 @@ export class ObjectsGroupEditorDialog extends Component {
}
}
-
export default withSerializableObject(ObjectsGroupEditorDialog, {
newObjectCreator: () => new gd.ObjectGroup(),
propName: 'group',
diff --git a/newIDE/app/src/ObjectsList/EnumerateObjects.spec.js b/newIDE/app/src/ObjectsList/EnumerateObjects.spec.js
index d1e7f7b7c2..a0a2ca7b3f 100644
--- a/newIDE/app/src/ObjectsList/EnumerateObjects.spec.js
+++ b/newIDE/app/src/ObjectsList/EnumerateObjects.spec.js
@@ -24,8 +24,14 @@ describe('EnumerateObjects', () => {
allObjectsList,
} = enumerateObjects(project, testLayout);
- expect(filterObjectsList(containerObjectsList, "myshapepainterobject")).toHaveLength(1);
- expect(filterObjectsList(projectObjectsList, "myshapepainterobject")).toHaveLength(0);
- expect(filterObjectsList(allObjectsList, "myshapepainterobject")).toHaveLength(1);
+ expect(
+ filterObjectsList(containerObjectsList, 'myshapepainterobject')
+ ).toHaveLength(1);
+ expect(
+ filterObjectsList(projectObjectsList, 'myshapepainterobject')
+ ).toHaveLength(0);
+ expect(
+ filterObjectsList(allObjectsList, 'myshapepainterobject')
+ ).toHaveLength(1);
});
});
diff --git a/newIDE/app/src/ResourcesEditor/BrowserResourceSources.js b/newIDE/app/src/ResourcesEditor/BrowserResourceSources.js
index 67dd27d1c8..1a606aba0b 100644
--- a/newIDE/app/src/ResourcesEditor/BrowserResourceSources.js
+++ b/newIDE/app/src/ResourcesEditor/BrowserResourceSources.js
@@ -11,7 +11,7 @@ const styles = {
explanations: {
textAlign: 'center',
margin: 20,
- }
+ },
};
const publicImageUrls = [
@@ -76,11 +76,8 @@ const publicImageUrls = [
const nameFromUrl = (url: string): string => {
const urlParts = url.split('/');
- return urlParts[urlParts.length - 1].replace(
- '.png',
- ''
- );
-}
+ return urlParts[urlParts.length - 1].replace('.png', '');
+};
export default [
{
@@ -108,7 +105,7 @@ export default [
leftAvatar={}
/>
);
- })
+ });
}
chooseResources = (
@@ -178,7 +175,10 @@ export default [
autoScrollBodyContent
>
-
Adding images from Dropbox, Google Drive... is coming soon! Download GDevelop desktop version to use your own assets.
+
+ Adding images from Dropbox, Google Drive... is coming soon!
+ Download GDevelop desktop version to use your own assets.
+
source.kind === this.props.resourceKind)
.map(source => ({
text: '',
- value: } />,
+ value: (
+ } />
+ ),
onClick: () => this._addFrom(source),
})),
{
diff --git a/newIDE/app/src/SceneEditor/InstancesFullEditor/index.js b/newIDE/app/src/SceneEditor/InstancesFullEditor/index.js
index 8121e0d703..f4128196ef 100644
--- a/newIDE/app/src/SceneEditor/InstancesFullEditor/index.js
+++ b/newIDE/app/src/SceneEditor/InstancesFullEditor/index.js
@@ -476,10 +476,16 @@ export default class InstancesFullEditor extends Component {
forceUpdatePropertiesEditor = () => {
if (this._propertiesEditor) this._propertiesEditor.forceUpdate();
- }
+ };
render() {
- const { project, layout, initialInstances, resourceSources, onChooseResource } = this.props;
+ const {
+ project,
+ layout,
+ initialInstances,
+ resourceSources,
+ onChooseResource,
+ } = this.props;
const selectedInstances = this.instancesSelection.getSelectedInstances();
const editors = {
@@ -491,7 +497,8 @@ export default class InstancesFullEditor extends Component {
instances={selectedInstances}
onInstancesModified={this._onInstancesModified}
editInstanceVariables={this.editInstanceVariables}
- ref={propertiesEditor => (this._propertiesEditor = propertiesEditor)}
+ ref={propertiesEditor =>
+ (this._propertiesEditor = propertiesEditor)}
/>
),
diff --git a/newIDE/app/src/UI/EditorMosaic/index.js b/newIDE/app/src/UI/EditorMosaic/index.js
index 2802a2fb7b..3c1ad1d1df 100644
--- a/newIDE/app/src/UI/EditorMosaic/index.js
+++ b/newIDE/app/src/UI/EditorMosaic/index.js
@@ -71,7 +71,8 @@ class EditorMosaic extends Component {
render() {
return (
React.cloneElement(this.props.editors[editorName], { path })}
+ renderTile={(editorName, path) =>
+ React.cloneElement(this.props.editors[editorName], { path })}
className="mosaic-blueprint-theme mosaic-gd-theme"
value={this.state.mosaicNode}
onChange={this._onChange}
diff --git a/newIDE/app/src/UI/HelpIcon/index.js b/newIDE/app/src/UI/HelpIcon/index.js
index d0881a230a..af133cc43c 100644
--- a/newIDE/app/src/UI/HelpIcon/index.js
+++ b/newIDE/app/src/UI/HelpIcon/index.js
@@ -16,9 +16,7 @@ export default (props: PropsType) => {
if (!helpPagePath) return null;
return (
- window.open(getHelpLink(helpPagePath), 'blank') }
- >
+ window.open(getHelpLink(helpPagePath), 'blank')}>
);
diff --git a/newIDE/app/src/UI/LocalFolderPicker/index.js b/newIDE/app/src/UI/LocalFolderPicker/index.js
index b0371d2d59..01aa01275f 100644
--- a/newIDE/app/src/UI/LocalFolderPicker/index.js
+++ b/newIDE/app/src/UI/LocalFolderPicker/index.js
@@ -21,7 +21,7 @@ const styles = {
},
};
-export default class LocalFolderPicker extends Component<*,*> {
+export default class LocalFolderPicker extends Component<*, *> {
onChooseFolder = () => {
if (!dialog || !electron) return;
diff --git a/newIDE/app/src/UI/ToolbarIcon.js b/newIDE/app/src/UI/ToolbarIcon.js
index 9341a8ad24..f9b36f1235 100644
--- a/newIDE/app/src/UI/ToolbarIcon.js
+++ b/newIDE/app/src/UI/ToolbarIcon.js
@@ -15,13 +15,7 @@ export default class ToolbarIcon extends Component {
filter: this.props.disabled ? 'grayscale(100%)' : undefined,
}}
>
-
+
);
}
diff --git a/newIDE/app/src/Utils/FuzzyOrEmptyFilter.js b/newIDE/app/src/Utils/FuzzyOrEmptyFilter.js
index 5c4cf0c7a2..aabdb0c546 100644
--- a/newIDE/app/src/Utils/FuzzyOrEmptyFilter.js
+++ b/newIDE/app/src/Utils/FuzzyOrEmptyFilter.js
@@ -7,5 +7,5 @@ import AutoComplete from 'material-ui/AutoComplete';
* @param {*} key
*/
export const fuzzyOrEmptyFilter = (searchText, key) => {
- return !key || AutoComplete.fuzzyFilter(searchText, key);
+ return !key || AutoComplete.fuzzyFilter(searchText, key);
};
diff --git a/newIDE/app/src/Utils/History.js b/newIDE/app/src/Utils/History.js
index b1804ea604..c75390b862 100644
--- a/newIDE/app/src/Utils/History.js
+++ b/newIDE/app/src/Utils/History.js
@@ -1,7 +1,4 @@
-import {
- serializeToJSObject,
- unserializeFromJSObject,
-} from './Serializer';
+import { serializeToJSObject, unserializeFromJSObject } from './Serializer';
// Tools function to keep track of the history of changes made
// on a serializable object from libGD.js
@@ -63,7 +60,12 @@ export const undo = (history, serializableObject, project = undefined) => {
}
const newCurrent = history.undoHistory[history.undoHistory.length - 1];
- unserializeFromJSObject(serializableObject, newCurrent, 'unserializeFrom', project);
+ unserializeFromJSObject(
+ serializableObject,
+ newCurrent,
+ 'unserializeFrom',
+ project
+ );
return {
undoHistory: history.undoHistory.slice(0, -1),
@@ -86,7 +88,12 @@ export const redo = (history, serializableObject, project = undefined) => {
}
const newCurrent = history.redoHistory[history.redoHistory.length - 1];
- unserializeFromJSObject(serializableObject, newCurrent, 'unserializeFrom', project);
+ unserializeFromJSObject(
+ serializableObject,
+ newCurrent,
+ 'unserializeFrom',
+ project
+ );
return {
undoHistory: [...history.undoHistory, history.current],
diff --git a/newIDE/app/src/fixtures/TestProject.js b/newIDE/app/src/fixtures/TestProject.js
index 89232384ae..42ef52b0c7 100644
--- a/newIDE/app/src/fixtures/TestProject.js
+++ b/newIDE/app/src/fixtures/TestProject.js
@@ -31,17 +31,11 @@ export const makeTestProject = gd => {
project.getResourcesManager().addResource(audioResource1);
// Create and expose some objects
- const shapePainterObject = new gd.ShapePainterObject(
- 'MyShapePainterObject'
- );
+ const shapePainterObject = new gd.ShapePainterObject('MyShapePainterObject');
const adMobObject = new gd.AdMobObject('MyAdMobObject');
const textObject = new gd.TextObject('MyTextObject');
- const tiledSpriteObject = new gd.TiledSpriteObject(
- 'MyTiledSpriteObject'
- );
- const panelSpriteObject = new gd.PanelSpriteObject(
- 'MyPanelSpriteObject'
- );
+ const tiledSpriteObject = new gd.TiledSpriteObject('MyTiledSpriteObject');
+ const panelSpriteObject = new gd.PanelSpriteObject('MyPanelSpriteObject');
const spriteObject = new gd.SpriteObject('MySpriteObject');
const spriteObjectWithBehaviors = new gd.SpriteObject(
'MySpriteObjectWithBehaviors'
@@ -62,7 +56,7 @@ export const makeTestProject = gd => {
sprite1.getOrigin().setY(20);
sprite1.getCenter().setX(100);
sprite1.getCenter().setY(200);
- const headCustomPoint = new gd.Point("Head");
+ const headCustomPoint = new gd.Point('Head');
headCustomPoint.setX(40);
headCustomPoint.setY(50);
sprite1.addPoint(headCustomPoint);
@@ -136,13 +130,20 @@ export const makeTestProject = gd => {
//Add a few variables
const testLayoutVariables = testLayout.getVariables();
- testLayoutVariables.insert("Variable1", new gd.Variable(), 0).setString("A multiline\nstr value");
- testLayoutVariables.insert("Variable2", new gd.Variable(), 1).setString("123456");
+ testLayoutVariables
+ .insert('Variable1', new gd.Variable(), 0)
+ .setString('A multiline\nstr value');
+ testLayoutVariables
+ .insert('Variable2', new gd.Variable(), 1)
+ .setString('123456');
const variable3 = new gd.Variable();
- variable3.getChild("Child1").setString("Child1 str value");
- variable3.getChild("Child2").setString("7891011");
- variable3.getChild("Child3").getChild("SubChild1").setString("Hello\nMultiline\nWorld");
- testLayoutVariables.insert("Variable3", variable3, 2);
+ variable3.getChild('Child1').setString('Child1 str value');
+ variable3.getChild('Child2').setString('7891011');
+ variable3
+ .getChild('Child3')
+ .getChild('SubChild1')
+ .setString('Hello\nMultiline\nWorld');
+ testLayoutVariables.insert('Variable3', variable3, 2);
//Create a few events
//Add a new "standard" event to the scene:
@@ -236,8 +237,14 @@ export const makeTestProject = gd => {
project.insertObject(globalTiledSpriteObject, 0);
// External events
- const testExternalEvents1 = project.insertNewExternalEvents('TestExternalEvents1', 0);
- const testExternalEvents2 = project.insertNewExternalEvents('TestExternalEvents2', 1);
+ const testExternalEvents1 = project.insertNewExternalEvents(
+ 'TestExternalEvents1',
+ 0
+ );
+ const testExternalEvents2 = project.insertNewExternalEvents(
+ 'TestExternalEvents2',
+ 1
+ );
return {
project,
diff --git a/newIDE/app/src/stories/ValueStateHolder.js b/newIDE/app/src/stories/ValueStateHolder.js
index 163cc10b43..02844dc1e9 100644
--- a/newIDE/app/src/stories/ValueStateHolder.js
+++ b/newIDE/app/src/stories/ValueStateHolder.js
@@ -6,13 +6,13 @@ export default class ValueStateHolder extends Component {
this.state = {
value: props.initialValue,
- }
+ };
}
render() {
return React.cloneElement(this.props.children, {
- onChange: value => this.setState({value}),
+ onChange: value => this.setState({ value }),
value: this.state.value,
- })
+ });
}
}
diff --git a/newIDE/app/src/stories/index.js b/newIDE/app/src/stories/index.js
index 684f65725a..03ed0e9d90 100644
--- a/newIDE/app/src/stories/index.js
+++ b/newIDE/app/src/stories/index.js
@@ -131,7 +131,9 @@ storiesOf('ParameterFields', module)
))
.add('StringField', () => (
-
+
- )).add('string', () => (
+ ))
+ .add('string', () => (