diff --git a/editor/scriptList.ts b/editor/scriptList.ts index ec6da5fd..fc0d6dd9 100644 --- a/editor/scriptList.ts +++ b/editor/scriptList.ts @@ -6127,7 +6127,7 @@ } static editorIcons = { - "blockly": "fa-puzzle-piece,#517EC0", + "blockly": "blockeditor,#517EC0", "touchdevelop": "touchdevelop,#308919", "docs": "fa-file-text-o,#E00069", "html": "fa-code,#E00069", @@ -6143,13 +6143,7 @@ if (!ic) ic = ScriptInfo.editorIcons["*"] ic = ic.replace(/,.*/, "") - // The mkImg function seems to require that the SVG be made up of a - // single path, which the Blockly logo isn't, so unfortunately, - // we need to special-case this. - if (this.getScriptType() == "blockly") - return HTML.mkImg(Util.mkAbsoluteUrl("blockly/icon.svg")); - else - return HTML.mkImg("svg:" + ic + ",white") + return HTML.mkImg("svg:" + ic + ",white") } public iconBgColor():string diff --git a/rt/svg.ts b/rt/svg.ts index f0eccacc..af378935 100644 --- a/rt/svg.ts +++ b/rt/svg.ts @@ -88,6 +88,8 @@ export module SVG { group: "M 146.602,137.257C 155.992,137.257 163.608,144.873 163.608,154.267C 163.608,163.658 155.992,171.273 146.602,171.273C 137.208,171.273 129.591,163.658 129.591,154.267C 129.591,144.873 137.208,137.257 146.602,137.257 Z M 129.227,179.743L 163.558,179.743C 169.226,179.743 174.86,181.722 178.867,185.115C 182.87,188.511 185.201,193.284 185.201,198.083L 185.201,199.566L 185.201,200.123L 185.201,271.383C 185.255,274.768 181.679,277.873 177.779,277.835C 173.931,277.797 170.47,274.719 170.523,271.383L 170.523,209.123L 165.841,209.123L 165.841,268.76L 165.815,268.76L 165.815,332.839C 165.849,334.913 165.007,336.983 163.544,338.449C 162.076,339.916 160.002,340.754 157.93,340.724C 153.865,340.66 150.226,336.902 150.287,332.839L 150.287,268.76L 142.523,268.76L 142.523,332.839C 142.557,334.913 141.715,336.983 140.252,338.449C 138.785,339.916 136.711,340.754 134.638,340.724C 130.573,340.66 126.934,336.902 126.995,332.839L 126.995,268.76L 126.972,268.76L 126.972,209.123L 122.264,209.123L 122.264,270.484C 122.302,273.869 118.719,276.963 114.818,276.914C 110.986,276.864 107.551,273.805 107.585,270.484L 107.585,199.202L 107.585,198.569L 107.585,198.083C 107.585,193.284 109.916,188.511 113.923,185.115C 117.927,181.722 123.56,179.743 129.227,179.743 Z M 240.662,137.257C 250.052,137.257 257.668,144.873 257.668,154.267C 257.668,163.658 250.052,171.273 240.662,171.273C 231.267,171.273 223.651,163.658 223.651,154.267C 223.651,144.873 231.267,137.257 240.662,137.257 Z M 223.287,179.743L 257.618,179.743C 263.286,179.743 268.92,181.722 272.927,185.115C 276.93,188.511 279.261,193.284 279.261,198.083L 279.261,199.566L 279.261,200.123L 279.261,271.383C 279.315,274.768 275.739,277.873 271.839,277.835C 267.991,277.797 264.53,274.719 264.583,271.383L 264.583,209.123L 259.901,209.123L 259.901,268.76L 259.875,268.76L 259.875,332.839C 259.909,334.912 259.067,336.983 257.604,338.449C 256.136,339.916 254.062,340.754 251.989,340.724C 247.925,340.66 244.286,336.902 244.347,332.839L 244.347,268.76L 236.583,268.76L 236.583,332.839C 236.617,334.912 235.775,336.983 234.312,338.449C 232.844,339.916 230.77,340.754 228.697,340.724C 224.633,340.66 220.994,336.902 221.055,332.839L 221.055,268.76L 221.032,268.76L 221.032,209.123L 216.324,209.123L 216.324,270.484C 216.362,273.869 212.778,276.963 208.878,276.914C 205.046,276.864 201.611,273.805 201.645,270.484L 201.645,199.202L 201.645,198.569L 201.645,198.083C 201.645,193.284 203.976,188.511 207.983,185.115C 211.987,181.722 217.62,179.743 223.287,179.743 Z M 334.722,137.258C 344.112,137.258 351.728,144.873 351.728,154.267C 351.728,163.658 344.112,171.273 334.722,171.273C 325.327,171.273 317.711,163.658 317.711,154.267C 317.711,144.873 325.327,137.258 334.722,137.258 Z M 317.347,179.743L 351.678,179.743C 357.346,179.743 362.98,181.722 366.987,185.115C 370.99,188.511 373.321,193.284 373.321,198.083L 373.321,199.566L 373.321,200.123L 373.321,271.383C 373.375,274.768 369.799,277.873 365.899,277.835C 362.051,277.797 358.59,274.719 358.642,271.383L 358.642,209.123L 353.961,209.123L 353.961,268.76L 353.935,268.76L 353.935,332.839C 353.969,334.913 353.127,336.983 351.664,338.449C 350.196,339.916 348.122,340.754 346.049,340.724C 341.985,340.66 338.345,336.902 338.407,332.839L 338.407,268.76L 330.643,268.76L 330.643,332.839C 330.677,334.913 329.835,336.983 328.372,338.449C 326.904,339.916 324.83,340.754 322.757,340.724C 318.693,340.66 315.054,336.902 315.115,332.839L 315.115,268.76L 315.091,268.76L 315.091,209.123L 310.384,209.123L 310.384,270.484C 310.421,273.869 306.838,276.963 302.938,276.914C 299.105,276.864 295.671,273.805 295.705,270.484L 295.705,199.202L 295.705,198.569L 295.705,198.083C 295.705,193.284 298.036,188.511 302.043,185.115C 306.046,181.722 311.68,179.743 317.347,179.743 Z ", im: "M 393.488,206.958L 393.488,321.247L 357.423,321.247L 357.423,369.234L 328.898,321.247L 196.081,321.247L 196.081,206.958L 393.488,206.958 Z M 87.4178,146.461L 292.537,146.461L 292.537,193.312L 182.971,193.312L 182.971,265.214L 154.531,265.214L 124.892,315.075L 124.892,265.214L 87.4178,265.214L 87.4178,146.461 Z ", arrowdownl: "M 183.668,152.318L 141.826,194.16L 141.826,337.618L 285.284,337.618L 327.126,295.776L 219.532,295.776L 339.08,176.228L 303.216,140.364L 183.668,259.911L 183.668,152.318 Z ", + blockeditor: "M 231.375,138.142C 231.375,188.526 190.507,229.394 140.123,229.394C 89.707,229.394 48.8452,188.526 48.8452,138.142C 48.8452,87.7259 89.707,46.8641 140.123,46.8641C 190.507,46.8641 231.375,87.7259 231.375,138.142 Z M 139.592,82.1322L 123.004,116.337L 85.1502,121.529L 112.627,147.988L 105.886,185.842L 139.592,168.192L 173.291,185.842L 167.088,147.988L 194.027,121.529L 156.704,116.337L 139.592,82.1322 Z M 432.061,138.142C 432.061,188.526 391.193,229.394 340.783,229.394C 290.393,229.394 249.531,188.526 249.531,138.142C 249.531,87.726 290.393,46.8642 340.783,46.8642C 391.193,46.8642 432.061,87.726 432.061,138.142 Z M 397.83,159.915C 400.436,159.915 401.979,157.841 401.979,155.76L 401.979,115.3C 401.979,112.72 399.904,110.639 397.318,110.639L 311.738,110.639L 301.386,118.949L 294.12,110.639L 286.342,110.639C 279.075,110.639 272.846,116.869 272.846,124.135L 272.846,146.42C 272.846,153.686 279.075,159.915 286.342,159.915L 294.12,159.915L 305.534,167.155L 314.855,159.915L 397.83,159.915 Z M 231.375,339.839C 231.375,390.249 190.507,431.117 140.123,431.117C 89.707,431.117 48.8452,390.249 48.8452,339.839C 48.8452,289.449 89.707,248.587 140.123,248.587C 190.507,248.587 231.375,289.449 231.375,339.839 Z M 168.631,368.878C 172.254,368.878 175.365,365.767 174.86,362.143L 174.86,314.949C 174.86,311.325 171.748,308.214 168.099,308.214L 114.196,308.214C 112.115,308.214 110.041,310.288 110.041,312.362L 110.041,326.875L 92.922,320.141C 88.268,318.592 83.5816,321.709 83.5816,326.37L 83.5816,349.18C 83.5816,354.372 88.268,357.483 92.922,355.409L 110.041,348.142L 110.041,364.218C 110.041,366.804 112.115,368.878 114.701,368.878L 168.631,368.878 Z M 432.061,339.839C 432.061,390.249 391.193,431.117 340.783,431.117C 290.393,431.117 249.531,390.249 249.531,339.839C 249.531,289.449 290.393,248.587 340.783,248.587C 391.193,248.587 432.061,289.449 432.061,339.839 Z M 332.499,316.517C 332.499,313.912 331.462,311.831 329.893,309.757C 328.351,308.214 326.27,307.177 323.664,307.177C 321.085,307.177 318.498,308.214 316.93,309.757C 315.387,311.325 314.35,313.406 314.35,315.986C 314.35,318.592 315.387,320.672 316.93,322.215C 318.498,323.758 320.579,324.795 323.159,324.795C 326.27,324.795 328.351,324.289 329.893,322.72C 331.462,321.178 332.499,319.104 332.499,316.517 Z M 332.499,366.298C 332.499,363.686 331.462,361.612 329.893,360.069C 328.351,358.526 326.27,357.483 323.664,357.483C 321.085,357.483 318.498,358.526 316.93,360.069C 315.387,361.612 314.35,363.686 314.35,366.298C 314.35,368.878 315.387,370.959 316.93,372.527C 318.498,374.07 320.579,375.107 323.159,375.107C 325.739,375.107 328.351,374.07 329.893,372.527C 331.462,370.959 332.499,368.878 332.499,366.298 Z M 372.434,338.802C 372.434,327.912 370.859,318.06 367.242,309.251C 364.124,299.911 358.939,291.627 352.198,283.324L 339.746,283.324C 346.507,291.627 351.666,300.442 354.784,309.251C 357.895,318.06 359.47,327.912 359.47,338.802C 359.47,359.564 352.71,377.693 339.746,393.768L 352.198,393.768C 358.939,386.528 363.593,378.225 367.242,368.878C 370.859,359.564 372.434,349.685 372.434,338.802 Z ", + }; var iconMapping:any = {