Skip to content

Commit 8cc5b57

Browse files
committed
refactor -- add words and rows, edit tag text
1 parent 742df85 commit 8cc5b57

File tree

16 files changed

+1271
-307
lines changed

16 files changed

+1271
-307
lines changed

css/style.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ svg text {
1414
user-select: none;
1515
}
1616

17-
#header {
17+
/*#header {
1818
position:absolute;
1919
top:0;
2020
left:0;
2121
background:#333;
2222
color:white;
2323
width:calc( 100% - 20px );
2424
padding:10px;
25-
}
25+
}*/
2626

2727
#drawing {
2828
margin-top:30px;
@@ -86,7 +86,7 @@ svg text {
8686
background:rgba(200,200,200,0.5);
8787
margin-top:5px;
8888
width:100px;
89-
height:100px;
89+
height:100px;
9090
}
9191

9292
.noselect {
@@ -144,4 +144,4 @@ svg text {
144144
}
145145
.word:hover .word--handle {
146146
opacity: 0.7;
147-
}
147+
}

css/style2.css

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
body {
2+
margin:0;
3+
-moz-osx-font-smoothing:grayscale;
4+
-webkit-font-smoothing:antialiased;
5+
font-family: BrownPro, Brown, futura, helvetica, arial, sans-serif;
6+
font-size: 11px;
7+
min-height:100%;
8+
overflow-y: scroll;
9+
}
10+
11+
svg text {
12+
cursor: default;
13+
-webkit-user-select: none;
14+
-moz-user-select: none;
15+
-ms-user-select: none;
16+
user-select: none;
17+
}
18+
19+
#header {
20+
position:fixed;
21+
background:black;
22+
width:100%;
23+
height:40px;
24+
top:0;
25+
}
26+
27+
#tooltip {
28+
width:175px;
29+
background:white;
30+
margin-bottom:10px;
31+
box-shadow: 0 0 10px #555;
32+
border-radius:3px;
33+
position:absolute;
34+
padding: 8px 0;
35+
font: 14px helvetica, arial, sans-serif;
36+
font-weight: 400;
37+
color:#444;
38+
display:none;
39+
}
40+
#tooltip.active {
41+
display:block;
42+
}
43+
#tooltip p {
44+
padding: 4px 14px;
45+
margin:0;
46+
cursor:default;
47+
}
48+
#tooltip p:hover {
49+
background-color: rgb(77, 157, 250);
50+
color:white;
51+
}
52+
#tooltip hr {
53+
border-width: 0;
54+
border-top:1px solid #ddd;
55+
}
56+
57+
58+
/* svg styles for main vis */
59+
#main {
60+
margin-top:40px;
61+
position:relative;
62+
}
63+
#main svg {
64+
background-color: hsl(40,10%,90%);
65+
}
66+
.row-drag {
67+
stroke-width:2;
68+
stroke-dasharray: 2,1;
69+
stroke:rgba(100,100,100,0.3);
70+
transition: stroke 300ms ease;
71+
cursor: row-resize;
72+
}
73+
.row-drag:hover {
74+
stroke-dasharray:none;
75+
stroke:rgba(100,100,100,0.8);
76+
}
77+
78+
.word text {
79+
font-family: BrownPro, Brown, futura, helvetica, arial, sans-serif;
80+
font-size:16px;
81+
text-anchor: middle;
82+
fill:black;
83+
}
84+
.word path {
85+
stroke:#333;
86+
fill:none;
87+
}
88+
.word .word-text {
89+
cursor: pointer;
90+
}
91+
92+
.word .word-cluster,
93+
.word .word-tag {
94+
font-size: 12px;
95+
cursor: text;
96+
}
97+
98+
.word .word-cluster {
99+
fill:#a94442;
100+
}
101+
.word .word-tag {
102+
fill:#333;
103+
}
104+
.editing .word-tag {
105+
fill: #fff;
106+
}
107+
.editing rect {
108+
fill: rgb(203, 120, 111);
109+
}

0 commit comments

Comments
 (0)