Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit eb1eff2e012715dc7d25ca155eec0d1efe042c86
Author: TradeX-app <my.github@tutanota.com>
Date:   Fri Aug 16 13:18:17 2024 +0200

    Overlays - Trade, Events - hit mask generation moved off render loop and cached

commit a12713d
Author: TradeX-app <my.github@tutanota.com>
Date:   Fri Aug 16 10:32:16 2024 +0200

    Squashed commit of the following:

    commit 29a0799
    Author: TradeX-app <my.github@tutanota.com>
    Date:   Fri Aug 16 03:58:23 2024 +0200

        FIXED: Scale - calcPriceDigits()  - regex

    commit 558c45d
    Author: TradeX-app <my.github@tutanota.com>
    Date:   Fri Aug 16 02:56:59 2024 +0200

        Scale - calcPriceDigits() - now returns digit count for Secondary Chart Panes

    commit 13ab230
    Author: TradeX-app <my.github@tutanota.com>
    Date:   Fri Aug 16 01:17:44 2024 +0200

        FIXED: Scale - calcPriceDigits() - remove trailing zeros to prevent unnecessary digits

    commit b6148d0
    Author: TradeX-app <my.github@tutanota.com>
    Date:   Thu Aug 15 13:17:06 2024 +0200

        FIXED: CEL - Canvas Layers - clear function - now clears correctly on high retinal screens
        Version 0.152.4

    commit 67651e6
    Author: TradeX-app <my.github@tutanota.com>
    Date:   Thu Aug 15 00:39:58 2024 +0200

        Squashed commit of the following:

        commit 8c378b5
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Thu Aug 15 00:29:52 2024 +0200

            Version: 0.152.3

        commit b2e477e
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Wed Aug 14 21:47:27 2024 +0200

            Optimized X-Axis, Y-Axis rendering - moved text font size measurement off the render loop

        commit b5a0ec9
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Wed Aug 14 20:34:24 2024 +0200

            Scale Width - optimized calculated on start() once, rather than every Scale redraw

        commit cbe0e2d
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Wed Aug 14 19:24:52 2024 +0200

            FIXED: yAxis width issue... as suspected, missed something in the refactor.

        commit c15eb64
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Tue Aug 13 23:12:13 2024 +0200

            Version 0.152.1

        commit 8093609
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Tue Aug 13 22:35:06 2024 +0200

            Update indicator.js, legend.js, window.js, and 2 more files

        commit ba2721e
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Tue Aug 13 03:25:23 2024 +0200

            TradeX Chart - layout converted to CSS grid
            Version 0.152.0

    commit 34e7afb
    Author: TradeX-app <my.github@tutanota.com>
    Date:   Wed Aug 14 15:11:05 2024 +0200

        FIXED: offScreenCanvas - pixel aspect ratio - caused issues on high retina screens

    commit 0207956
    Author: TradeX-app <my.github@tutanota.com>
    Date:   Tue Aug 13 23:16:29 2024 +0200

        Squashed commit of the following:

        commit c15eb64
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Tue Aug 13 23:12:13 2024 +0200

            Version 0.152.1

        commit 8093609
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Tue Aug 13 22:35:06 2024 +0200

            Update indicator.js, legend.js, window.js, and 2 more files

        commit ba2721e
        Author: TradeX-app <my.github@tutanota.com>
        Date:   Tue Aug 13 03:25:23 2024 +0200

            TradeX Chart - layout converted to CSS grid
            Version 0.152.0

commit 8c378b5
Author: TradeX-app <my.github@tutanota.com>
Date:   Thu Aug 15 00:29:52 2024 +0200

    Version: 0.152.3

commit b2e477e
Author: TradeX-app <my.github@tutanota.com>
Date:   Wed Aug 14 21:47:27 2024 +0200

    Optimized X-Axis, Y-Axis rendering - moved text font size measurement off the render loop

commit b5a0ec9
Author: TradeX-app <my.github@tutanota.com>
Date:   Wed Aug 14 20:34:24 2024 +0200

    Scale Width - optimized calculated on start() once, rather than every Scale redraw

commit cbe0e2d
Author: TradeX-app <my.github@tutanota.com>
Date:   Wed Aug 14 19:24:52 2024 +0200

    FIXED: yAxis width issue... as suspected, missed something in the refactor.

commit c15eb64
Author: TradeX-app <my.github@tutanota.com>
Date:   Tue Aug 13 23:12:13 2024 +0200

    Version 0.152.1

commit 8093609
Author: TradeX-app <my.github@tutanota.com>
Date:   Tue Aug 13 22:35:06 2024 +0200

    Update indicator.js, legend.js, window.js, and 2 more files

commit ba2721e
Author: TradeX-app <my.github@tutanota.com>
Date:   Tue Aug 13 03:25:23 2024 +0200

    TradeX Chart - layout converted to CSS grid
    Version 0.152.0
  • Loading branch information
tradex-app committed Aug 16, 2024
1 parent 29a0799 commit 89431e1
Show file tree
Hide file tree
Showing 8 changed files with 5,747 additions and 5,622 deletions.
3,770 changes: 1,902 additions & 1,868 deletions demo/tradex-chart.es.js

Large diffs are not rendered by default.

3,770 changes: 1,902 additions & 1,868 deletions docs/tradex-chart.es.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"private": false,
"version": "0.152.4",
"version": "0.152.5",
"license": "GNU GPL3",
"scripts": {
"dev": "vite",
Expand Down
3 changes: 2 additions & 1 deletion src/components/primitives/newsEvent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// newsEvent.js
// draw a single news event marker

import { fillMask } from "../../renderer/canvas"
import { svgToImage } from "../../utils/DOM"
import { limit } from "../../utils/number"

Expand All @@ -26,7 +27,7 @@ export default class NewsEvent {
const i = this.icon
const c = this.cfg
const k = this.hit.getIndexValue(data.key)
const hit = svgToImage(c.iconEvent, k, this.dims)
const hit = fillMask(k, i)
const h = limit(data.w, c.iconMinDim, c.iconHeight)
const w = limit(data.w, c.iconMinDim, c.iconWidth)
const x = this.data.x
Expand Down
13 changes: 12 additions & 1 deletion src/components/primitives/trade.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// trade.js
// draw a single trade marker

import { fillMask } from "../../renderer/canvas"
import { svgToImage } from "../../utils/DOM"
import { limit } from "../../utils/number"

Expand All @@ -10,6 +11,8 @@ export default class Trade {
data
buy
sell
mask
dims = {w: 0, h: 0}

constructor(target, theme) {
this.scene = target.scene
Expand All @@ -23,13 +26,20 @@ export default class Trade {
this.sell = svgToImage(this.cfg.iconSell, this.cfg.sellColour, this.dims)
}

/**
* draw buy or sell icon using cached images generated from SVG
* draw hit mask - generated on the fly
* @param {*} data
* @return {*}
* @memberof Trade
*/
draw(data) {
this.data = data
const c = this.cfg
const i = (data.side === "buy") ? this.buy : this.sell
const j = (data.side === "buy") ? c.iconBuy : c.iconSell
const k = this.hit.getIndexValue(data.key)
const hit = svgToImage(j, k, this.dims)
const hit = fillMask(k, i)
const h = limit(data.w, c.iconMinDim, c.iconHeight)
const w = limit(data.w, c.iconMinDim, c.iconWidth)
const x = this.data.x
Expand All @@ -47,4 +57,5 @@ export default class Trade {

return {x,y,w,h,k}
}

}
Loading

0 comments on commit 89431e1

Please sign in to comment.