diagonals working except for start/end times
This commit is contained in:
@@ -30,8 +30,8 @@ export const ShapeType = {
|
||||
text anchored_text note anchored_note signpost double_curve arc icon emoji sticker arrow_up arrow_down arrow_left arrow_right price_label price_note arrow_marker flag vertical_line horizontal_line cross_line horizontal_ray trend_line info_line trend_angle arrow ray extended parallel_channel disjoint_angle flat_bottom anchored_vwap pitchfork schiff_pitchfork_modified schiff_pitchfork balloon comment inside_pitchfork pitchfan gannbox gannbox_square gannbox_fixed gannbox_fan fib_retracement fib_trend_ext fib_speed_resist_fan fib_timezone fib_trend_time fib_circles fib_spiral fib_speed_resist_arcs fib_channel xabcd_pattern cypher_pattern abcd_pattern callout triangle_pattern 3divers_pattern head_and_shoulders fib_wedge elliott_impulse_wave elliott_triangle_wave elliott_triple_combo elliott_correction elliott_double_combo cyclic_lines time_cycles sine_line long_position short_position forecast date_range price_range date_and_price_range bars_pattern ghost_feed projection rectangle rotated_rectangle circle ellipse triangle polyline path curve cursor dot arrow_cursor eraser measure zoom brush highlighter regression_trend fixed_range_volume_profile
|
||||
*/
|
||||
Segment: {name: 'Trend Line', code: 'trend_line'},
|
||||
Ray: {name: 'Ray', code: 'ray'},
|
||||
Line: {name: 'Extended Line', code: 'extended', drawingProp: 'linetoolextended'},
|
||||
Ray: {name: 'Ray', code: 'ray', drawingProp: 'linetoolray'},
|
||||
Line: {name: 'Extended Line', code: 'extended', drawingProp: 'linetoolray'},
|
||||
HRay: {name: 'Horizontal Ray', code: 'horizontal_ray'},
|
||||
HLine: {name: 'Horizontal Line', code: 'horizontal_line', drawingProp: 'linetoolhorzline'},
|
||||
VLine: {name: 'Vertical Line', code: 'vertical_line', drawingProp: 'linetoolvertline'},
|
||||
@@ -539,20 +539,20 @@ export class VLine extends Line {
|
||||
|
||||
export class DLine extends Line {
|
||||
constructor(model, onModel=null, onDelete=null, props=null) {
|
||||
super(ShapeType.Line, onModel, onDelete, props)
|
||||
super(ShapeType.Ray, onModel, onDelete, props)
|
||||
|
||||
// Model
|
||||
this.model.pointA = null // {time:..., price:...}
|
||||
this.model.pointB = null
|
||||
|
||||
this.setModel(model) // call setModel at the end
|
||||
console.log('initial shape model', {...model})
|
||||
}
|
||||
|
||||
|
||||
drawingOverrides() {
|
||||
const result = super.drawingOverrides();
|
||||
result.linetoolextended = {extendLeft: false, extendRight: false}
|
||||
result.extendLeft = false
|
||||
result.extendRight = false
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -585,7 +585,6 @@ export class DLine extends Line {
|
||||
dirty = true
|
||||
}
|
||||
if (dirty) {
|
||||
console.log('DLine points were dirty', this.tvPoints, points)
|
||||
super.onPoints(points);
|
||||
this.updateModel({pointA: points[0], pointB: points[1]})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user