Skip to content

Commit

Permalink
Resolving conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvwilson committed Sep 12, 2019
1 parent ae24398 commit 7c346e6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
20 changes: 10 additions & 10 deletions _posts/2019-08-29-transform.html
Expand Up @@ -11,7 +11,7 @@

<h1><a id="#filter">Filter</a></h1>
<div id="wrapper">
<div id="first">
<div id="first">
<img src="{{'/guide/images/transform_filter.png'| relative_url}}" width="100%">
</div>
<div id="second">
Expand All @@ -27,7 +27,7 @@ <h3>Examples:</h3>

<h1><a id="#groupby">Group By</a></h1>
<div id="wrapper">
<div id="first">
<div id="first">
<img src="{{'/guide/images/transform_groupBy.png'| relative_url}}" width="100%">
</div>
<div id="second">
Expand All @@ -42,7 +42,7 @@ <h3>Examples:</h3>

<h1><a id="#mutate">Mutate</a></h1>
<div id="wrapper">
<div id="first">
<div id="first">
<img src="{{'/guide/images/transform_mutate.png'| relative_url}}" width="100%">
</div>
<div id="second">
Expand All @@ -60,8 +60,8 @@ <h3>Examples:</h3>

<h1><a id="#select">Select</a></h1>
<div id="wrapper">
<div id="first">
<img src="/guide/images/transform_select.png" width="100%">
<div id="first">
<img src="/guide/images/transform_select.png" width="100%">
</div>
<div id="second">
<h3>Description:</h3>
Expand All @@ -76,10 +76,10 @@ <h3>Examples:</h3>

<h1><a id="#sort">Sort</a></h1>
<div id="wrapper">
<div id="first">
<div id="first">
<img src="{{'/guide/images/transform_sort.png'| relative_url}}" width="100%">
</div>
<div id="second">
</div>
<div id="second">
<h3>Description:</h3>
<p>Order table rows by an expression involving its variables. Use the checkbox to sort in descending order.</p>
<h3>Arguments</h3>
Expand All @@ -93,7 +93,7 @@ <h3>Examples:</h3>

<h1><a id="#summarize">Summarize</a></h1>
<div id="wrapper">
<div id="first">
<div id="first">
</div>
<div id="second">
<h3>Description:</h3>
Expand All @@ -106,7 +106,7 @@ <h3>Examples:</h3>

<h1><a id="#ungroup">Ungroup</a></h1>
<div id="wrapper">
<div id="first">
<div id="first">
<img src="{{'/guide/images/transform_ungroup.png'| relative_url}}" width="100%">
</div>
<div id="second">
Expand Down
4 changes: 2 additions & 2 deletions generators/js/transform_select.js
Expand Up @@ -10,5 +10,5 @@ Blockly.JavaScript['transform_select'] = (block) => {
.join(',')

const descending = (block.getFieldValue('DESCENDING') === 'FALSE')
return `.sort(${block.tbId}, [${columns}], ${descending})`
}
return `.select(${block.tbId}, [${columns}], ${descending})`
}
12 changes: 3 additions & 9 deletions generators/js/transform_sort.js
@@ -1,16 +1,10 @@
Blockly.JavaScript['transform_sort'] = (block) => {


const columns = block.getFieldValue('MULTIPLE_COLUMNS')
const columns = block.getFieldValue('MULTIPLE_COLUMNS')
.split(',')
.map(c => c.trim())
.filter(c => (c.length > 0))
.map(c => Blockly.JavaScript.quote_(c))
.join(',')

if (block.getFieldValue('DESCENDING') == 'FALSE') {
return `.sort(${block.tbId}, [${columns}], false)`
} else {
return `.sort(${block.tbId}, [${columns}], true)`
}
const descending = (block.getFieldValue('DESCENDING') === 'TRUE')
return `.sort(${block.tbId}, [${columns}], ${descending})`
}

0 comments on commit 7c346e6

Please sign in to comment.