Skip to content

Commit ef920c0

Browse files
render algorithm change, step 1
1 parent ed371a0 commit ef920c0

3 files changed

Lines changed: 468 additions & 244 deletions

File tree

source/css/LightPivot.css

Lines changed: 108 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
position: relative;
33
width: 100%;
44
height: 100%;
5-
border-radius: 5px;
65
background: white;
7-
font-size: 13px;
86
overflow: hidden;
7+
border-radius: 0;
8+
font-family: Arial, sans-serif;
9+
font-size: 10pt;
910
}
1011

1112
.lpt .formatLeft {
@@ -68,11 +69,11 @@
6869
background: #FF9B47;
6970
}
7071

71-
.lpt table tr:first-child th:first-child {
72-
position: relative;
73-
white-space: nowrap;
74-
vertical-align: bottom;
75-
}
72+
/*.lpt table tr:first-child th:first-child {*/
73+
/*position: relative;*/
74+
/*white-space: nowrap;*/
75+
/*vertical-align: bottom;*/
76+
/*}*/
7677

7778
.lpt .drillDownIcon {
7879
position: relative;
@@ -129,20 +130,20 @@
129130
}
130131

131132
.lpt table {
132-
position: relative;
133+
border-collapse: collapse;
133134
width: 100%;
134135
}
135136

136-
.lpt .fixedHeader {
137-
position: absolute;
138-
left: 0;
139-
top: 0;
140-
background: white;
141-
}
137+
/*.lpt .fixedHeader {*/
138+
/*position: absolute;*/
139+
/*left: 0;*/
140+
/*top: 0;*/
141+
/*background: white;*/
142+
/*}*/
142143

143144
.lpt > .tableContainer {
144145
position: absolute;
145-
overflow: auto;
146+
overflow: hidden;
146147
width: 100%;
147148
height: 100%;
148149
-webkit-transition: left .5s ease;
@@ -151,86 +152,124 @@
151152
transition: left .5s ease;
152153
}
153154

154-
.lpt > .tableContainer > table {
155-
min-width: 100%;
156-
}
155+
/*.lpt > .tableContainer > table {*/
156+
/*min-width: 100%;*/
157+
/*}*/
158+
159+
/*.lpt > .tableContainer td, .lpt > .tableContainer th {*/
160+
/*border-radius: 3px;*/
161+
/*padding: .4em;*/
162+
/*}*/
163+
164+
/*.lpt > .tableContainer tbody.fixedHeader th:last-child:hover {*/
165+
/*background: #FFEEAA;*/
166+
/*box-shadow: inset 0 0 15px #FFFFFF;*/
167+
/*}*/
168+
169+
/*.lpt th {*/
170+
/*background: #F0F0F0;*/
171+
/*text-align: left;*/
172+
/*font-weight: bold;*/
173+
/*box-shadow: inset 0 -5px 10px rgb(216, 216, 216);*/
174+
/*}*/
175+
176+
/*.lpt thead tr:last-child th {*/
177+
/*cursor: pointer;*/
178+
/*-webkit-transition: all .3s ease;*/
179+
/*-moz-transition: all .3s ease;*/
180+
/*-o-transition: all .3s ease;*/
181+
/*transition: all .3s ease;*/
182+
/*}*/
183+
184+
/*.lpt thead tr:last-child th:first-child ~ th:hover {*/
185+
/*background: #e2c8ff;*/
186+
/*background: #FFEEAA;*/
187+
/*box-shadow: inset 0 0 15px #FFFFFF;*/
188+
/*}*/
189+
190+
/*.lpt td {*/
191+
/*background: #E1E8FF;*/
192+
/*background: #FFFFFF;*/
193+
/*box-shadow: inset 0 0 2px rgb(216, 216, 216);*/
194+
/*text-align: right;*/
195+
/*-webkit-transition: all .3s ease;*/
196+
/*-moz-transition: all .3s ease;*/
197+
/*-o-transition: all .3s ease;*/
198+
/*transition: all .3s ease;*/
199+
/*}*/
157200

158-
.lpt > .tableContainer td, .lpt > .tableContainer th {
159-
border-radius: 3px;
160-
padding: .4em;
201+
.lpt tr:hover td {
202+
background: #FFF7D7;
161203
}
162204

163-
.lpt > .tableContainer tbody.fixedHeader th:last-child:hover {
164-
/*background: #e2c8ff;*/
205+
.lpt table td:hover {
165206
background: #FFEEAA;
166-
box-shadow: inset 0 0 15px #FFFFFF;
167207
}
168208

169-
.lpt th {
170-
/*background: #C0CDFF;*/
171-
background: #F0F0F0;
172-
text-align: left;
173-
box-shadow: inset 0 -5px 10px rgb(216, 216, 216);
174-
}
209+
/* DeepSee theme */
175210

176-
.lpt thead tr:last-child th {
177-
cursor: pointer;
178-
-webkit-transition: all .3s ease;
179-
-moz-transition: all .3s ease;
180-
-o-transition: all .3s ease;
181-
transition: all .3s ease;
211+
.lpt th, .lpt td, .lpt .lpt-headerValue {
212+
box-shadow: none;
213+
text-align: left;
214+
border-radius: 0;
215+
padding: 3px 6px 3px 6px;
216+
border: 1px solid rgb(208, 208, 208);
182217
}
183218

184-
.lpt thead tr:last-child th:first-child ~ th:hover {
185-
/*background: #e2c8ff;*/
186-
background: #FFEEAA;
187-
box-shadow: inset 0 0 15px #FFFFFF;
219+
.lpt th, .lpt .lpt-headerValue {
220+
background: #F0F0F0;
188221
}
189222

190-
.lpt td {
191-
/*background: #E1E8FF;*/
192-
background: #FFFFFF;
193-
box-shadow: inset 0 0 2px rgb(216, 216, 216);
194-
text-align: right;
195-
-webkit-transition: all .3s ease;
196-
-moz-transition: all .3s ease;
197-
-o-transition: all .3s ease;
198-
transition: all .3s ease;
223+
/* new */
224+
.lpt .lpt-tableBlock table {
225+
table-layout: fixed;
199226
}
200227

201228
.lpt th, .lpt td {
202229
white-space: nowrap;
230+
box-sizing: border-box;
203231
}
204232

205-
.lpt tr:hover td {
206-
/*background: #ffe6cf;*/
207-
background: #FFF7D7;
233+
.lpt .tableContainer .lpt-topSection, .lpt .tableContainer .lpt-bottomSection {
234+
position: relative;
235+
overflow: hidden;
208236
}
209237

210-
.lpt table td:hover {
211-
/*background: #e2c8ff;*/
212-
background: #FFEEAA;
238+
.lpt .tableContainer .lpt-header {
239+
position: relative;
240+
float: left;
241+
/*width: 100px;*/
213242
}
214243

215-
.lpt tbody > tr > th {
216-
cursor: pointer;
244+
.lpt .tableContainer .lpt-topHeader {
245+
position: relative;
246+
overflow: hidden;
247+
/*margin-left: 100px;*/
217248
}
218249

219-
/* DeepSee theme */
250+
.lpt .tableContainer .lpt-leftHeader {
251+
position: relative;
252+
overflow: hidden;
253+
float: left;
254+
/*width: 100px;*/
255+
}
220256

221-
.lpt {
222-
border-radius: 0;
223-
font-family: Arial, sans-serif;
224-
font-size: 10pt;
257+
.lpt .tableContainer .lpt-tableBlock {
258+
position: relative;
259+
overflow: auto;
260+
/*margin-left: 100px;*/
225261
}
226262

227-
.lpt table {
228-
border-collapse: collapse;
263+
.lpt .tableContainer .lpt-headerValue {
264+
font-weight: bold;
265+
border-right: none;
266+
border-bottom: none;
229267
}
230268

231-
.lpt .tableContainer th, .lpt .tableContainer td {
232-
box-shadow: none;
233-
border-radius: 0;
234-
padding: 3px 6px 3px 6px;
235-
border: 1px solid rgb(208, 208, 208);
269+
.lpt .tableContainer .lpt-leftHeader th {
270+
border-right: none;
271+
}
272+
273+
.lpt .tableContainer .lpt-topHeader th {
274+
border-bottom: none;
236275
}

source/js/LightPivotTable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ LightPivotTable.prototype.popDataSource = function () {
117117
*/
118118
LightPivotTable.prototype.dataIsChanged = function () {
119119

120-
this.pivotView.renderRawData(this.dataController.getData().rawData);
120+
this.pivotView.renderRawData(this.dataController.getData());
121121

122122
};
123123

0 commit comments

Comments
 (0)