Skip to content

Commit

Permalink
Merge pull request #39 from PhaserEditor2D/develop
Browse files Browse the repository at this point in the history
Release 3.1.1
  • Loading branch information
PhaserEditor2D authored May 26, 2020
2 parents 1d4fbab + 1314104 commit 7cf377d
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 15 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

## Version 3.1.1 - May 25, 2020

### Fixed

* [#33](https://github.com/PhaserEditor2D/PhaserEditor2D-v3/issues/33) Wrong BitmapText default origin.
* [#32](https://github.com/PhaserEditor2D/PhaserEditor2D-v3/issues/32) The server checks if there is a new version available.
* Monaco (code) editor updates content with external changes only if the flag `-enable-advanced-js-editor` is set. Now it updates always.
* [#37](https://github.com/PhaserEditor2D/PhaserEditor2D-v3/issues/37) TypeScript project template opens the README file the first time, with the instructions to run the project.

## Version 3.1.0 - May 24, 2020

### Added
Expand Down
2 changes: 0 additions & 2 deletions source/editor/plugins/phasereditor2d.code/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
],
"scripts": [
"_out/phasereditor2d.code.js",
"scripts/showdown-1.9.0/showdown.min.js",
"scripts/monaco-editor-0.20.0/defineRequire.js",
"scripts/monaco-editor-0.20.0/min/vs/loader.js",
"scripts/monaco-editor-0.20.0/min/vs/editor/editor.main.nls.js",
"scripts/monaco-editor-0.20.0/min/vs/editor/editor.main.js"
],
"scripts-dev": [
"_out/phasereditor2d.code.js",
"scripts/showdown-1.9.0/showdown.min.js",
"scripts/dev-monaco-editor-0.20.0/defineRequire.js",
"scripts/dev-monaco-editor-0.20.0/dev/vs/loader.js",
"scripts/dev-monaco-editor-0.20.0/dev/vs/editor/editor.main.nls.js",
Expand Down

This file was deleted.

10 changes: 5 additions & 5 deletions source/editor/plugins/phasereditor2d.code/src/ui/ModelManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace phasereditor2d.code.ui {

for (const fileName of e.getAddRecords()) {

if (!this.isValidFileName(fileName)) {
if (!ModelManager.handleFileName(fileName)) {

continue;
}
Expand All @@ -43,7 +43,7 @@ namespace phasereditor2d.code.ui {

for (const fileName of e.getDeleteRecords()) {

if (!this.isValidFileName(fileName)) {
if (!ModelManager.handleFileName(fileName)) {

continue;
}
Expand All @@ -60,7 +60,7 @@ namespace phasereditor2d.code.ui {

for (const fileName of e.getModifiedRecords()) {

if (!this.isValidFileName(fileName)) {
if (!ModelManager.handleFileName(fileName)) {

continue;
}
Expand All @@ -81,7 +81,7 @@ namespace phasereditor2d.code.ui {

for (const oldFileName of e.getRenameFromRecords()) {

if (!this.isValidFileName(oldFileName)) {
if (!ModelManager.handleFileName(oldFileName)) {

continue;
}
Expand All @@ -105,7 +105,7 @@ namespace phasereditor2d.code.ui {
return filename.endsWith(".js") ? "javascript" : "typescript";
}

private isValidFileName(filename: string) {
public static handleFileName(filename: string) {

return filename.endsWith(".js") || filename.endsWith(".ts");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,19 @@ namespace phasereditor2d.code.ui.editors {
}
}

protected onEditorInputContentChanged() {
protected async onEditorInputContentChanged() {

// handled by the ModelManager.
if (CodePlugin.getInstance().isAdvancedJSEditor()) {

if (ModelManager.handleFileName(this.getInput().getName())) {
// do nothing, the model manager will handle this!
return;
}
}

const str = await colibri.ui.ide.FileUtils.preloadAndGetFileString(this.getInput());

this.getModel().setValue(str);
}
}
}
2 changes: 1 addition & 1 deletion source/editor/plugins/phasereditor2d.ide/src/IDEPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ namespace phasereditor2d.ide {

/* program entry point */

export const VER = "3.1.0";
export const VER = "3.1.1";

async function main() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace phasereditor2d.scene.ui.sceneobjects {

let defaultValue = 0.5;

if (obj instanceof Text) {
if (obj instanceof Text || obj instanceof BitmapText) {

defaultValue = 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"openFiles": [
"scenes/Level.scene"
"README.TXT"
]
}

0 comments on commit 7cf377d

Please sign in to comment.