Skip to content

Commit

Permalink
Flo editor with Firefox improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex authored and oodamien committed Jan 31, 2019
1 parent a6cd1c4 commit ea38976
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ui/package.json
Expand Up @@ -49,7 +49,7 @@
"web-animations-js": "2.3.1",
"stompjs": "2.3.3",
"jshint": "2.9.5",
"spring-flo": "0.8.6",
"spring-flo": "https://github.com/spring-projects/spring-flo#431e8ff5c3b8aca40f90893ce859c2c9d2165174",
"ng-busy": "1.4.4",
"rxjs-compat": "6.2.1",
"uuid": "3.3.2"
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/streams/components/flo/support/node-helper.ts
Expand Up @@ -37,9 +37,9 @@ const DECORATION_ICON_MAP = new Map<string, string>()
// Default icons (unicode chars) for each group member, unless they override
const GROUP_ICONS = new Map<string, string>()
.set('app', '⌸') // U+2338 (Quad equal symbol)
.set('source', '')// 2907
.set('source', '')// 21D2
.set('processor', 'λ') // 3bb //flux capacitor? 1D21B
.set('sink', '') // 2907
.set('sink', '') // 21D2
.set('task', '☉') // 2609 ⚙=2699 gear (rubbish)
.set('destination', '⦂') // 2982
.set('tap', '⦂') // 2982
Expand Down
7 changes: 5 additions & 2 deletions ui/src/app/streams/components/flo/support/shapes.ts
Expand Up @@ -16,6 +16,9 @@ export const TYPE_INSTANCE_DOT = 'dataflow-InstanceDot';
export const TYPE_INCOMING_MESSAGE_RATE = 'dataflow-incoming-rate';
export const TYPE_OUTGOING_MESSAGE_RATE = 'dataflow-outgoing-rate';

export const IS_FF = window.navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
export const LABEL2_OFFSET_Y = IS_FF ? '38%' : '53%';

joint.shapes.flo.DataFlowApp = joint.shapes.basic.Generic.extend({

markup:
Expand Down Expand Up @@ -81,7 +84,7 @@ joint.shapes.flo.DataFlowApp = joint.shapes.basic.Generic.extend({
'.label2': {
'y-alignment': 'middle',
'ref-x': HORIZONTAL_PADDING + 2, // jointjs specific: relative position to ref'd element
'ref-y': 0.55, // jointjs specific: relative position to ref'd element
'ref-y': LABEL2_OFFSET_Y, // jointjs specific: relative position to ref'd element
ref: '.box', // jointjs specific: element for ref-x, ref-y
fill: 'black',
'font-size': 20
Expand Down Expand Up @@ -168,7 +171,7 @@ joint.shapes.flo.Destination = joint.shapes.basic.Generic.extend({
'.label2': {
'y-alignment': 'middle',
'ref-x': HORIZONTAL_PADDING + 2, // jointjs specific: relative position to ref'd element
'ref-y': 0.55, // jointjs specific: relative position to ref'd element
'ref-y': LABEL2_OFFSET_Y, // jointjs specific: relative position to ref'd element
ref: '.box', // jointjs specific: element for ref-x, ref-y
fill: 'black',
'font-size': 20
Expand Down

0 comments on commit ea38976

Please sign in to comment.