| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609 | /** * @license * Blockly Demos: Block Factory * * Copyright 2016 Google Inc. * https://developers.google.com/blockly/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *   http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */html, body {  height: 100%;  min-height: 375px;}body {  background-color: #fff;  font-family: sans-serif;  margin: 0 5px;  overflow: hidden;}h1 {  font-weight: normal;  font-size: 140%;}h3 {  margin-top: 5px;  margin-bottom: 0;}table {  border: none;  border-collapse: collapse;  height: 100%;  margin: 0;  padding: 0;  width: 100%;}td {  vertical-align: top;  padding: 0;}p {  display: block;  -webkit-margin-before: 0em;  -webkit-margin-after: 0em;  -webkit-margin-start: 0px;  -webkit-margin-end: 0px;  padding: 5px 0px;}#factoryHeader {  display: table;  height: 10%;}#blockly {  position: absolute;}#blocklyMask {  background-color: #000;  cursor: not-allowed;  display: none;  position: fixed;  opacity: 0.2;  z-index: 9;}#preview {  position: absolute;}pre,#languageTA {  border: #ddd 1px solid;  margin-top: 0;  position: absolute;  overflow: scroll;}#languageTA {  display: none;  font: 10pt monospace;}.downloadButton {  padding: 5px;}.disabled {  color: #888;}button:disabled, .buttonStyle:disabled {  opacity: 0.6;}button>*, .buttonStyle>* {  opacity: 1;  vertical-align: text-bottom;}button, .buttonStyle {  border-radius: 4px;  border: 1px solid #ddd;  background-color: #eee;  color: #000;  padding: 10px;  margin: 10px 5px;  font-size: small;}.buttonStyle:hover:not(:disabled), button:hover:not(:disabled) {  box-shadow: 2px 2px 5px #888;}.buttonStyle:hover:not(:disabled)>*, button:hover:not(:disabled)>* {  opacity: 1;}#linkButton {  display: none;}#helpButton {  float: right;}#blockFactoryContent {  height: 85%;  width: 100%;  overflow: hidden;}#blockFactoryPreview {  height: 100%;  width: 100%;}#blockLibraryContainer {  vertical-align: bottom;}#blockLibraryControls {  text-align: right;  vertical-align: middle;}#previewContainer {  vertical-align: bottom;}#buttonContainer {  text-align: right;  vertical-align: middle;}#files {  position: absolute;  visibility: hidden;}.toolbox {  display: none;}#blocklyWorkspaceContainer {  width: 50%;}#workspaceFactoryContent {  clear: both;  display: none;  height: 90%;  overflow-x: hidden;  overflow-y: scroll;}/* Exporter */#blockLibraryExporter {  clear: both;  display: none;  height: 90%;  overflow-x: hidden;  overflow-y: scroll;}#exportSelector {  display: inline-block;  float: left;  height: 70%;  width: 30%;}#exportSettings {  float: left;  overflow: hidden;  padding-left: 16px;  width: 20%;}#selectedBlocksTextContainer {  max-height: 200px;  overflow-y: scroll;  padding-bottom: 2em;}::-webkit-scrollbar {  -webkit-appearance: none;  width: 7px;}::-webkit-scrollbar-thumb {  border-radius: 4px;  background-color: #ccc;  -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);}.subsettings {  margin: 0px 25px;}#exporterHiddenWorkspace { display: none;}#exportPreview {  float: right;  height: 90%;  overflow: hidden;  width: 45%;}.exportPreviewTextArea {  display: block;  float: right;  height: 40%;  width: 100%;}#genStubs_textArea, #blockDefs_textArea {  display: block;  height: 80%;  margin-right: 20px;  max-height: 300px;  overflow: scroll;  position: static;}#blockDefs_label, #genStubs_label {  display: block;}#blockSelector {  background-color: #eee;  border: 1px solid lightgrey;  width: 80%;  height: 90%;  overflow-y: scroll;  position: relative;}/* Exporter Block Option */.blockOption {  background-color: #eee;  padding: 15px 20px;  width: 95%;}.blockOption_check_label {  position: relative;}.blockOption_check {  float: left;  padding: 4px;}.blockOption_label {  float: left;  max-width: inherit;  overflow-y: scroll;  word-wrap: break-word;}.blockOption_preview {  height: 100px;  padding-top: 10px;  width: 90%;}/* Block Library */#dropdownDiv_blockLib {  max-height: 65%;  overflow-y: scroll;}#button_blockLib {  border-color: darkgrey;  font-size: large;}.button_alert {  background-color: #fcc;  border-color: #f99;}.button_warn {  background-color: #aea;  border-color: #5d5;}/* Tabs */.tab {  float: left;  padding: 5px 19px;}.tab:hover:not(.tabon){  background-color: #e8e8e8;}.tab.tabon {  background-color: #ccc;}.tab.taboff {  cursor: pointer;}#tabContainer {  background-color: #f8f8f8;  border-top: 1px solid #ddd;  border-bottom: 1px solid #ddd;  display: table;  width: 100%;}/* Workspace Factory */section {  float: left;}aside {  float: right;}#categoryTable>table {  border: 1px solid #ccc;  border-bottom: none;  width: auto;}td.tabon {  background-color: #ccc;  border-bottom-color: #ccc;  padding: 5px 19px;}td.taboff {  cursor: pointer;  padding: 5px 19px;}td.taboff:hover {  background-color: #eee;}.large {  font-size: large;}.inputfile {  height: 0;  opacity: 0;  overflow: hidden;  position: absolute;  width: 0;  z-index: -1;}#wfactoryHeader {  height: 29%;  padding: 0.5%;}#workspaceTabs {  background-color: #f8f8f8;  border: 1px solid #ccc;  display: table;  width: auto;}#toolbox_section {  height: 85%;  width: 60%;}#previewHelp {  padding: 10px;  width: 98%;}#toolbox_blocks {  height: 100%;  width: 100%;}#preview_blocks {  height: 80%;  padding: 10px;  width: 100%;}#createDiv {  height: 79%;  padding: 0.5%;  width: 60%;}#previewDiv {  border: 10px solid #eee;  height: 77%;  margin-right: 0.5%;  padding-bottom: 10px;  width: 35%;}#previewBorder {  border: 5px solid #ddd;  height: 100%;  padding-right: 20px;}.disabled {  background-color: white;  opacity: 0.5;}#toolbox_div {  display: table;  height: auto;  margin-right: 5%;  overflow: hidden;  width: 35%;}#preload_div {  display: table;  height: 75%;  margin-left: 2%;  margin-right: 2%;  max-height: 500px;  overflow: hidden;  overflow-y: scroll;  width: 30%;}#shadowBlockDropdown {  height: 15%;}#preloadHelp {  display: table-row;  height: 30%;}#workspace_options {  display: table-row;  margin-top: 2%;}#disable_div {  background-color: white;  height: 100%;  left: 0;  opacity: .5;  position: absolute;  top: 0;  width: 100%;  z-index: -1;  /* Start behind workspace */}#grid_options, #zoom_options, #maxBlockNumber_option {  padding-left: 15px;}#modalShadow {  display: none;  position: fixed;  top: 0;  right: 0;  bottom: 0;  left: 0;  background: rgba(0, 0, 0, 0.05);  z-index: 100;}/* Rules for Closure popup color picker */.goog-palette {  outline: none;  cursor: default;}.goog-palette-cell {  height: 13px;  width: 15px;  margin: 0;  border: 0;  text-align: center;  vertical-align: middle;  border-right: 1px solid #000;  font-size: 1px;}.goog-palette-colorswatch {  border: 1px solid #000;  height: 13px;  position: relative;  width: 15px;}.goog-palette-cell-hover .goog-palette-colorswatch {  border: 1px solid #fff;}.goog-palette-cell-selected .goog-palette-colorswatch {  border: 1px solid #000;  color: #fff;}.goog-palette-table {  border: 1px solid #000;  border-collapse: collapse;}.goog-popupcolorpicker {  position: absolute;  z-index: 101;  /* On top of the modal Shadow. */}/* The container <div> - needed to position the dropdown content */.dropdown {  display: inline-block;}/* Dropdown Content (Hidden by Default) */.dropdown-content {  background-color: #fff;  box-shadow: 0px 8px 16px 0px rgba(0,0,0,.2);  display: none;  min-width: 170px;  opacity: 1;  position: absolute;  z-index: 101;  /* On top of the modal Shadow. */}/* Links inside the dropdown */.dropdown-content a, .dropdown-content label {  color: black;  display: block;  font-size: small;  padding: 12px 16px;  text-decoration: none;}/* Change color  of dropdown links on hover. */.dropdown-content a:hover, .dropdown-content label:hover {  background-color: #EEE;}/* Change color of dropdown links on selected. */.dropdown-content-selected {  background-color: #DDD;}/* Show the dropdown menu */.show {  display: block;}.shadowBlock>.blocklyPath {  fill-opacity: .5;  stroke-opacity: .5;}.shadowBlock>.blocklyPathLight,.shadowBlock>.blocklyPathDark {  display: none;}
 |