Skip to content

Commit

Permalink
Small changes asked from customer
Browse files Browse the repository at this point in the history
  • Loading branch information
jleblond committed Apr 3, 2021
1 parent c75bba1 commit 291f65b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
Binary file modified app/assets/images/default_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions app/javascript/packs/mindmap/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ export class Canvas{

displayBubbles = (ctx) => {
this.redrawBackground(ctx)
this.bubbles.forEach(function(bubble) {
bubble.display(ctx)
});
}
}

Expand Down
7 changes: 7 additions & 0 deletions app/javascript/packs/mindmap/canvasDraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export class CanvasDraw extends Canvas {
this.loadData(ctx);
}

displayBubbles = (ctx) => {
this.redrawBackground(ctx)
this.bubbles.forEach(function(bubble) {
bubble.display(ctx)
});
}

createIdea(x, y){
this.bubbles.push(new BubbleIdea(undefined, x, y,
DEFAULT_WIDTH, DEFAULT_HEIGHT,
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/packs/mindmap/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Canvas
export const DEFAULT_CANVAS_WIDTH = 1820;
export const DEFAULT_CANVAS_HEIGHT = 1024;
export const DEFAULT_CANVAS_WIDTH = 1244;
export const DEFAULT_CANVAS_HEIGHT = 700;


// Idea
Expand Down
5 changes: 0 additions & 5 deletions app/javascript/packs/mindmap/idea.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ export class BubbleIdea{

// Display the Idea
drawLabel(ctx) {
ctx.clearRect(this.left, this.top, this.width/2, this.height/2);
ctx.fillStyle = this.background_color;
ctx.fillRect(this.left, this.top, this.width/2, this.height/2);


ctx.font = "16px Georgia";
ctx.fillStyle = this.text_color;
ctx.fillText(this.name, this.left + this.width/8, this.top + this.height/4);
Expand Down
12 changes: 6 additions & 6 deletions app/views/ideas/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
<%= f.label :url, "Link (URL)" %>
<%= f.text_field :url, class:"form-control" %>
</div>
<div class="form-group">
<%= f.label :background_color, "Background Color", class: "control-label" %>
<div style="width: 30%;">
<%= f.color_field :background_color, class:"form-control"%>
</div>
</div>
<!-- <div class="form-group">-->
<%#= f.label :background_color, "Background Color", class: "control-label" %>
<!-- <div style="width: 30%;">-->
<%#= f.color_field :background_color, class:"form-control"%>
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<%= f.label :text_color, "Text Color", class: "control-label" %>
<div style="width: 30%;">
Expand Down

0 comments on commit 291f65b

Please sign in to comment.