aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jodersky@gmail.com>2014-05-11 12:53:24 +0200
committerJakob Odersky <jodersky@gmail.com>2014-05-11 12:53:24 +0200
commitf840698f6841353c83ed0a9225e741e59df5fb29 (patch)
tree7820cbe2f91225f8a892b3e434a3665bc47fc734
parent6298b331e612381bcc8f9e0f5a9fd4042b360a30 (diff)
downloadplayGraph-f840698f6841353c83ed0a9225e741e59df5fb29.tar.gz
playGraph-f840698f6841353c83ed0a9225e741e59df5fb29.tar.bz2
playGraph-f840698f6841353c83ed0a9225e741e59df5fb29.zip
remove ability to move timeline
-rw-r--r--app/css/app.css2
-rw-r--r--app/js/directives.js45
2 files changed, 16 insertions, 31 deletions
diff --git a/app/css/app.css b/app/css/app.css
index 1b32625..1b79d29 100644
--- a/app/css/app.css
+++ b/app/css/app.css
@@ -7,7 +7,7 @@
.world {
position: relative;
- overflow: hidden;
+ border: solid #999999 1px;
}
.world .line {
diff --git a/app/js/directives.js b/app/js/directives.js
index 2ae53e6..3004ebd 100644
--- a/app/js/directives.js
+++ b/app/js/directives.js
@@ -16,45 +16,30 @@ app.directive('pgLine', function () {
paper.setup(canvas);
var path;
- var selected = null;
var drag = false;
mainTool.onMouseDown = function(event) {
- var hit = paper.project.hitTest(event.point)
- if (hit) {
- selected = hit.item;
- } else {
- paper.project.clear();
- // If we produced a path before, deselect it:
- if (path) {
-
- path.selected = false;
- }
-
- // Create a new path and set its stroke color to black:
- path = new paper.Path({
- segments: [event.point],
- strokeColor: 'rgba(7,140,255,.5)',
- strokeWidth: 100,
- fullySelected: true,
- strokeCap: 'round'
- });
- selected = null;
- };
-
+ paper.project.clear();
+ // If we produced a path before, deselect it:
+ if (path) {
+ path.selected = false;
+ }
+ // Create a new path and set its stroke color to black:
+ path = new paper.Path({
+ segments: [event.point],
+ strokeColor: 'rgba(7,140,255,.5)',
+ strokeWidth: 100,
+ fullySelected: true,
+ strokeCap: 'round'
+ });
+
drag = true;
};
mainTool.onMouseMove = function(event) {
- console.log(event.point);
if (drag) {
- if (selected) {
- selected.position = event.point;
- scope.$apply();
- } else {
- path.add(event.point);
- }
+ path.add(event.point);
}
}