-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7029 from AnalyticalGraphicsInc/tileset-inspector…
…-fix Fix 3D Tiles Inspector Styling
- workspaces
- pre-template-literals
- pre-prettier-v3
- pre-prettier
- pre-let-const
- post-workspaces
- post-template-literals
- post-prettier-v3
- post-prettier
- post-let-const
- cesium-workspaces
- 1.125
- 1.124
- 1.123.1
- 1.123
- 1.122
- 1.121.1
- 1.121
- 1.120
- 1.119
- 1.118.2
- 1.118.1
- 1.118
- 1.117
- 1.116
- 1.115
- 1.114
- 1.113
- 1.112
- 1.111
- 1.111-release
- 1.110.1
- 1.110
- 1.109
- 1.108
- 1.107.2
- 1.107.1
- 1.107
- 1.106.1
- 1.106
- 1.105.2
- 1.105.1
- 1.105
- 1.104
- 1.103
- 1.102
- 1.101
- 1.100
- 1.99
- 1.98.1
- 1.98
- 1.97
- 1.96
- 1.95
- 1.94.3
- 1.94.2
- 1.94.1
- 1.94
- 1.93
- 1.92
- 1.91
- 1.90
- 1.89
- 1.88
- 1.87.1
- 1.87
- 1.86.1
- 1.86
- 1.85
- 1.84
- 1.83
- 1.82
- 1.81
- 1.80
- 1.79.1
- 1.79
- 1.78
- 1.77
- 1.76
- 1.75
- 1.74
- 1.73
- 1.72
- 1.71
- 1.70.1
- 1.70
- 1.69
- 1.68
- 1.67
- 1.66
- 1.65
- 1.64
- 1.63.1
- 1.63
- 1.62
- 1.61
- 1.60
- 1.59
- 1.58.1
- 1.58
- 1.57
- 1.56.1
- 1.56
- 1.55
- 1.54
- 1.53
- 1.52
- 1.51
- 1.50
Showing
7 changed files
with
157 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
define([ | ||
'../Core/defined', | ||
'../Core/Check' | ||
],function( | ||
defined, | ||
Check) { | ||
'use strict'; | ||
|
||
/** | ||
* A static class with helper functions used by the CesiumInspector and Cesium3DTilesInspector | ||
* @private | ||
*/ | ||
var InspectorShared = {}; | ||
|
||
/** | ||
* Creates a checkbox component | ||
* @param {String} labelText The text to display in the checkbox label | ||
* @param {String} checkedBinding The name of the variable used for checked binding | ||
* @param {String} [enableBinding] The name of the variable used for enable binding | ||
* @return {Element} | ||
*/ | ||
InspectorShared.createCheckbox = function (labelText, checkedBinding, enableBinding) { | ||
//>>includeStart('debug', pragmas.debug); | ||
Check.typeOf.string('labelText', labelText); | ||
Check.typeOf.string('checkedBinding', checkedBinding); | ||
//>>includeEnd('debug'); | ||
var checkboxContainer = document.createElement('div'); | ||
var checkboxLabel = document.createElement('label'); | ||
var checkboxInput = document.createElement('input'); | ||
checkboxInput.type = 'checkbox'; | ||
|
||
var binding = 'checked: ' + checkedBinding; | ||
if (defined(enableBinding)) { | ||
binding += ', enable: ' + enableBinding; | ||
} | ||
checkboxInput.setAttribute('data-bind', binding); | ||
checkboxLabel.appendChild(checkboxInput); | ||
checkboxLabel.appendChild(document.createTextNode(labelText)); | ||
checkboxContainer.appendChild(checkboxLabel); | ||
return checkboxContainer; | ||
}; | ||
|
||
/** | ||
* Creates a section element | ||
* @param {Element} panel The parent element | ||
* @param {String} headerText The text to display at the top of the section | ||
* @param {String} sectionVisibleBinding The name of the variable used for visible binding | ||
* @param {String} toggleSectionVisibilityBinding The name of the function used to toggle visibility | ||
* @return {Element} | ||
*/ | ||
InspectorShared.createSection = function (panel, headerText, sectionVisibleBinding, toggleSectionVisibilityBinding) { | ||
//>>includeStart('debug', pragmas.debug); | ||
Check.defined('panel', panel); | ||
Check.typeOf.string('headerText', headerText); | ||
Check.typeOf.string('sectionVisibleBinding', sectionVisibleBinding); | ||
Check.typeOf.string('toggleSectionVisibilityBinding', toggleSectionVisibilityBinding); | ||
//>>includeEnd('debug'); | ||
var section = document.createElement('div'); | ||
section.className = 'cesium-cesiumInspector-section'; | ||
section.setAttribute('data-bind', 'css: { "cesium-cesiumInspector-section-collapsed": !' + sectionVisibleBinding + ' }'); | ||
panel.appendChild(section); | ||
|
||
var sectionHeader = document.createElement('h3'); | ||
sectionHeader.className = 'cesium-cesiumInspector-sectionHeader'; | ||
sectionHeader.appendChild(document.createTextNode(headerText)); | ||
sectionHeader.setAttribute('data-bind', 'click: ' + toggleSectionVisibilityBinding); | ||
section.appendChild(sectionHeader); | ||
|
||
var sectionContent = document.createElement('div'); | ||
sectionContent.className = 'cesium-cesiumInspector-sectionContent'; | ||
section.appendChild(sectionContent); | ||
return sectionContent; | ||
}; | ||
|
||
return InspectorShared; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters