Skip to content

Commit

Permalink
Removed unused Menu entries, updated doc and increased version number
Browse files Browse the repository at this point in the history
  • Loading branch information
RoflCopter24 committed Nov 4, 2017
1 parent 96ab738 commit 9afba3b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "FTVT",
"version": "2017.10.29",
"version": "2017.11.04",
"author": "Florian Vick <florian@florian-vick.de>",
"description": "A visualisation tool for football tactics",
"license": "MIT",
"main": "./dist/electron/main.js",
"scripts": {
"build": "node .electron-vue/build.js && export USE_SYSTEM_XORRISO=true && electron-builder",
"build": "node .electron-vue/build.js && electron-builder",
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
Expand Down
6 changes: 3 additions & 3 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const menuTpl = [
{
label: 'Bearbeiten',
submenu: [
{ role: 'undo' },
{ role: 'redo' },
{ type: 'separator' },
// { role: 'undo' },
// { role: 'redo' },
// { type: 'separator' },
{
role: 'delete',
click() { mainWindow.webContents.send('edit:selDelete'); },
Expand Down
11 changes: 5 additions & 6 deletions src/renderer/components/objects/LineObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ const DEFAULT_OPACITY = 1;

export default class LineObject extends Konva.Line {
/**
* Constructs a new instance of the {EllipseObject} class
* Constructs a new instance of the {LineObject} class
* @param linePoints All points on this line
* @param elemId ID of this instance
* @description
* The EllipseObject is treated as a rectangle during creation,
* so the start end end point will not be part of the ellipse itself
* but rather the bounding rectangle.
* The position of the object will be the center of the ellipse
* The LineObject is not really a line but a path connecting multiple
* points, so you can basically create crazy shapes with it by adding
* multiple points
*/
constructor(linePoints, elemId) {
super({
Expand Down Expand Up @@ -60,7 +59,7 @@ export default class LineObject extends Konva.Line {
}

/**
* Legacy property that controls the current fill color
* Legacy property that controls the current stroke color
* @param value The new fill color or {null} to retrieve the current one
* @returns {string}
*/
Expand Down
16 changes: 11 additions & 5 deletions src/renderer/components/objects/PlayerObject.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import Konva from 'konva';

const BASE_CIRCLE_RADIUS = 26;
const BASE_CIRCLE_DEF_FILL_COLOR = '#ff0000';
const BASE_CIRCLE_DEF_STROKE_COLOR = '#000000';
const BASE_CIRCLE_DEF_STROKE_WIDTH = 2;
const BASE_TEXT_DEF_COLOR = '#ffffff';

class PlayerObject extends Konva.Group {
/**
* Constructs a new instance of the PlayerObject class
Expand All @@ -18,8 +24,8 @@ class PlayerObject extends Konva.Group {
});

this._title = objectName;
this._baseColor = '#ff0000';
this._txtColor = '#ffffff';
this._baseColor = BASE_CIRCLE_DEF_FILL_COLOR;
this._txtColor = BASE_TEXT_DEF_COLOR;
if (!loaded) {
this.base = this.createBaseCircle(this.baseColor());
this.baseText = this.createBaseText(this.title(), 16, 'Roboto', this.txtColor());
Expand Down Expand Up @@ -233,10 +239,10 @@ class PlayerObject extends Konva.Group {
return new Konva.Circle({
x: this.x(),
y: this.y(),
radius: 32,
radius: BASE_CIRCLE_RADIUS,
fill: color,
stroke: 'black',
strokeWidth: 4,
stroke: BASE_CIRCLE_DEF_STROKE_COLOR,
strokeWidth: BASE_CIRCLE_DEF_STROKE_WIDTH,
name: 'PlayerObjectBase',
id: this.title() + '_base',
});
Expand Down

0 comments on commit 9afba3b

Please sign in to comment.