| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 function clicked(event) { | 116 function clicked(event) { |
| 117 button._clicked(/** @type {!Event} */ (event.data)); | 117 button._clicked(/** @type {!Event} */ (event.data)); |
| 118 } | 118 } |
| 119 | 119 |
| 120 mainButtonClone.setToggled(action.toggled()); | 120 mainButtonClone.setToggled(action.toggled()); |
| 121 buttons.push(mainButtonClone); | 121 buttons.push(mainButtonClone); |
| 122 | 122 |
| 123 var document = button.element.ownerDocument; | 123 var document = button.element.ownerDocument; |
| 124 document.documentElement.addEventListener('mouseup', mouseUp, false); | 124 document.documentElement.addEventListener('mouseup', mouseUp, false); |
| 125 | 125 |
| 126 var optionsGlassPane = new UI.GlassPane(document); | 126 var optionsGlassPane = new UI.GlassPane(document, false /* dimmed */, true
/* blockPointerEvents */); |
| 127 var optionsBar = new UI.Toolbar('fill', optionsGlassPane.element); | 127 var optionsBar = new UI.Toolbar('fill', optionsGlassPane.element); |
| 128 optionsBar._contentElement.classList.add('floating'); | 128 optionsBar._contentElement.classList.add('floating'); |
| 129 const buttonHeight = 26; | 129 const buttonHeight = 26; |
| 130 | 130 |
| 131 var hostButtonPosition = button.element.totalOffset(); | 131 var hostButtonPosition = button.element.totalOffset(); |
| 132 | 132 |
| 133 var topNotBottom = hostButtonPosition.top + buttonHeight * buttons.length
< document.documentElement.offsetHeight; | 133 var topNotBottom = hostButtonPosition.top + buttonHeight * buttons.length
< document.documentElement.offsetHeight; |
| 134 | 134 |
| 135 if (topNotBottom) | 135 if (topNotBottom) |
| 136 buttons = buttons.reverse(); | 136 buttons = buttons.reverse(); |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 | 930 |
| 931 /** | 931 /** |
| 932 * @override | 932 * @override |
| 933 * @param {boolean} enabled | 933 * @param {boolean} enabled |
| 934 */ | 934 */ |
| 935 _applyEnabledState(enabled) { | 935 _applyEnabledState(enabled) { |
| 936 super._applyEnabledState(enabled); | 936 super._applyEnabledState(enabled); |
| 937 this.inputElement.disabled = !enabled; | 937 this.inputElement.disabled = !enabled; |
| 938 } | 938 } |
| 939 }; | 939 }; |
| OLD | NEW |