Skip to content

Commit

Permalink
fix sockets on wb-contains
Browse files Browse the repository at this point in the history
  • Loading branch information
dethe committed Dec 31, 2019
1 parent 1b899fd commit 8393046
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions css/app.css
Expand Up @@ -207,16 +207,16 @@ wb-workspace > wb-contains {
padding-bottom: 16px;
}

wb-contains:empty::before {
/* wb-contains:empty::before {
display: block;
content: "Drag Blocks Here";
/* FIXME: Localization problem, all localizable content should be in HTML text */
// FIXME: Localization problem, all localizable content should be in HTML text
width: 100%;
height: 20px;
text-align: center;
margin-top: auto;
margin-bottom: auto;
}
} */


/* Accordion Colors and Icons */
Expand Down
13 changes: 11 additions & 2 deletions css/block.css
Expand Up @@ -73,12 +73,21 @@ wb-step > svg.tab, wb-context > svg.tab{
fill: white;
}

wb-contains > svg.slot{
/* wb-contains > svg.slot{
position: absolute;
display: block;
left: 34px;
top: -12px;
fill: white;
} */

wb-contains::before{
content: url("../images/tab.svg");
position: absolute;
display: block;
left: 34px;
top: -12px;
fill: white;
}

wb-step, wb-context{
Expand Down Expand Up @@ -233,7 +242,7 @@ wb-context > wb-contains {
background-color: rgba(255, 255, 255, 1.0);
position: relative;
margin-bottom: 0;
padding-top: 2px;
padding-top: 3px;
padding-left: 5px;
padding-bottom: 10px;
border-top-left-radius: 10px;
Expand Down
2 changes: 1 addition & 1 deletion images/tab.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions js/block.js
Expand Up @@ -139,8 +139,8 @@
}

function setDefaultSlot(element){
let tab = dom.child(element, 'svg.slot');
if (!tab){
let slot = dom.child(element, 'svg.slot');
if (!slot){
element.append(dom.svg('svg', {'class': 'slot', width: 40, height: 12}, [dom.svg('path', {d: tabPath})]));
}
}
Expand Down Expand Up @@ -1039,10 +1039,6 @@

var ContainsProto = Object.create(HTMLElement.prototype);

ContainsProto.createdCallback = function containsCreated(){
setDefaultSlot(this);
};

/* You sure love Object.defineProperty, dontcha, Eddie? */
Object.defineProperty(ContainsProto, 'firstInstruction', {
get: function() {
Expand Down

0 comments on commit 8393046

Please sign in to comment.