| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 * @param {!Event} e | 726 * @param {!Event} e |
| 727 */ | 727 */ |
| 728 _mouseMove: function(e) | 728 _mouseMove: function(e) |
| 729 { | 729 { |
| 730 var rowElement = e.target.enclosingNodeOrSelfWithClass("timeline-tree-it
em"); | 730 var rowElement = e.target.enclosingNodeOrSelfWithClass("timeline-tree-it
em"); |
| 731 if (!this._highlightQuad(rowElement)) | 731 if (!this._highlightQuad(rowElement)) |
| 732 this._hideQuadHighlight(); | 732 this._hideQuadHighlight(); |
| 733 | 733 |
| 734 var taskBarElement = e.target.enclosingNodeOrSelfWithClass("timeline-gra
ph-bar"); | 734 var taskBarElement = e.target.enclosingNodeOrSelfWithClass("timeline-gra
ph-bar"); |
| 735 if (taskBarElement && taskBarElement._tasksInfo) { | 735 if (taskBarElement && taskBarElement._tasksInfo) { |
| 736 var offset = taskBarElement.offsetLeft; | 736 var parentWidth = taskBarElement.parentElement.offsetWidth; |
| 737 this._timelineGrid.showCurtains(offset >= 0 ? offset : 0, taskBarEle
ment.offsetWidth); | 737 var offset = Math.max(0, taskBarElement.offsetLeft); |
| 738 var width = taskBarElement.offsetWidth; |
| 739 this._timelineGrid.showCurtains(offset / parentWidth, (offset + widt
h) / parentWidth); |
| 738 } else | 740 } else |
| 739 this._timelineGrid.hideCurtains(); | 741 this._timelineGrid.hideCurtains(); |
| 740 }, | 742 }, |
| 741 | 743 |
| 742 /** | 744 /** |
| 743 * @param {!Event} event | 745 * @param {!Event} event |
| 744 */ | 746 */ |
| 745 _keyDown: function(event) | 747 _keyDown: function(event) |
| 746 { | 748 { |
| 747 if (!this._lastSelectedRecord || event.shiftKey || event.metaKey || even
t.ctrlKey) | 749 if (!this._lastSelectedRecord || event.shiftKey || event.metaKey || even
t.ctrlKey) |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 } else { | 1304 } else { |
| 1303 this._element.classList.add("hidden"); | 1305 this._element.classList.add("hidden"); |
| 1304 } | 1306 } |
| 1305 }, | 1307 }, |
| 1306 | 1308 |
| 1307 _dispose: function() | 1309 _dispose: function() |
| 1308 { | 1310 { |
| 1309 this._element.remove(); | 1311 this._element.remove(); |
| 1310 } | 1312 } |
| 1311 } | 1313 } |
| OLD | NEW |