<commit_before>define(function(require) {

    'use strict';

    var Backbone = require('backbone');
    var PIXI     = require('pixi');

    var ArrowView = require('./arrow');

    var Colors  = require('../../colors/colors');
    var Vector2 = require('../../math/vector2');


    var ArrowOutlineView = ArrowView.extend({

        initialize: function(options) {
            options = _.extend({
                lineWidth: 1,
                lineColor: '#000',
                lineAlpha: 1
            }, options);

            ArrowView.prototype.initialize.apply(this, [options]);

            this.lineWidth = options.lineWidth;
            this.lineColor = options.lineColor;
            this.lineAlpha = options.lineAlpha;
        },

        drawArrow: function() {
            var origin = this._originVector.set(this.model.get('originX'), this.model.get('originY'));
            var target = this._targetVector.set(this.model.get('targetX'), this.model.get('targetY'));

            var angle  = this._direction.set(target).sub(origin).angle();
            var scale  = 1;
            var length = origin.distance(target);
            if (length < this.headLength) {
                scale = length / this.headLength;
                length = this.headLength;
            }

            this.model.set('length', length);

            var tail = this.tailGraphics;
            var head = this.headGraphics;

            // Draw it pointing straight to the right and then rotate it.
            tail.clear();
            head.clear();

            tail.lineStyle(this.lineWidth, this.lineColor, this.lineAlpha);
            head.lineStyle(this.lineWidth, this.lineColor, this.lineAlpha);

            tail.moveTo(length - this.headLength,  this.tailWidth / 2);
            tail.lineTo(0,  this.tailWidth / 2);
            tail.lineTo(0, -this.tailWidth / 2);
            tail.lineTo(length - this.headLength, -this.tailWidth / 2);

            head.moveTo(length - this.headLength,  this.headWidth / 2);
            head.lineTo(length, 0);
            head.lineTo(length - this.headLength, -this.headWidth / 2);

            this.displayObject.x = origin.x;
            this.displayObject.y = origin.y;
            this.transformFrame.rotation = angle;
            this.transformFrame.scale.x = scale;
            this.transformFrame.scale.y = scale;
        }

    });

    return ArrowOutlineView;
});<commit_msg>The ArrowOutlineView is complete.  Now I just need to position the starting arrow in the right place relative to the start of the curve.<commit_after>define(function(require) {

    'use strict';

    var Backbone = require('backbone');
    var PIXI     = require('pixi');

    var ArrowView = require('./arrow');

    var Colors  = require('../../colors/colors');
    var Vector2 = require('../../math/vector2');


    var ArrowOutlineView = ArrowView.extend({

        initialize: function(options) {
            options = _.extend({
                lineWidth: 1,
                lineColor: '#000',
                lineAlpha: 1
            }, options);

            ArrowView.prototype.initialize.apply(this, [options]);

            this.lineWidth = options.lineWidth;
            this.lineColor = options.lineColor;
            this.lineAlpha = options.lineAlpha;
        },

        drawArrow: function() {
            var origin = this._originVector.set(this.model.get('originX'), this.model.get('originY'));
            var target = this._targetVector.set(this.model.get('targetX'), this.model.get('targetY'));

            var angle  = this._direction.set(target).sub(origin).angle();
            var scale  = 1;
            var length = origin.distance(target);
            if (length < this.headLength) {
                scale = length / this.headLength;
                length = this.headLength;
            }

            this.model.set('length', length);

            var tail = this.tailGraphics;
            var head = this.headGraphics;

            // Draw it pointing straight to the right and then rotate it.
            tail.clear();
            head.clear();

            tail.lineStyle(this.lineWidth, this.lineColor, this.lineAlpha);
            head.lineStyle(this.lineWidth, this.lineColor, this.lineAlpha);

            tail.moveTo(length - this.headLength,  this.tailWidth / 2);
            tail.lineTo(0,                         this.tailWidth / 2);
            tail.lineTo(0,                        -this.tailWidth / 2);
            tail.lineTo(length - this.headLength, -this.tailWidth / 2);

            head.moveTo(length - this.headLength,  this.headWidth / 2 - this.tailWidth / 2);
            head.lineTo(length - this.headLength,  this.headWidth / 2);
            head.lineTo(length - this.lineWidth,   0);
            head.lineTo(length - this.headLength, -this.headWidth / 2);
            head.lineTo(length - this.headLength, -this.headWidth / 2 + this.tailWidth / 2);

            this.displayObject.x = origin.x;
            this.displayObject.y = origin.y;
            this.transformFrame.rotation = angle;
            this.transformFrame.scale.x = scale;
            this.transformFrame.scale.y = scale;
        }

    });

    return ArrowOutlineView;
});
{'fraction_non_alphanumeric': 0.12423430321592649, 'fraction_numerical': 0.007274119448698315, 'mean_word_length': 1.8121636167922497, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2470086', 'n_tokens_mistral': 1486, 'n_tokens_neox': 1397, 'n_words': 296}