Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gradient.yaml to make use of range.untrack() #184

Merged
merged 1 commit into from
Aug 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions samples/excel/90-just-for-fun/gradient.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ script:
const sheet = await OfficeHelpers.ExcelUtilities
.forceCreateSheet(context.workbook, "Gradient", true /*clearOnly*/);

sheet.getRange().format.set({
sheet.getRange().untrack().format.set({
rowHeight: 15,
columnWidth: 15,
fill: {
Expand All @@ -51,11 +51,11 @@ script:

fillInColors(colors2D, originalSize);

let range = sheet.getCell(1, 1).getResizedRange(
originalSize - 1, originalSize - 1);
let range = sheet.getCell(1, 1).untrack().getResizedRange(
originalSize - 1, originalSize - 1).untrack();
for (let row = 0; row < originalSize; row++) {
for (let col = 0; col < originalSize; col++) {
range.getCell(row, col).format.fill.color =
range.getCell(row, col).untrack().format.fill.color =
colors2D[row][col];
}
}
Expand Down Expand Up @@ -141,7 +141,7 @@ template:
<h2 class="ms-font-l">Size
<span class="ms-font-m">(width x height)</span>
</h2>
<input id="size" type="range" value="25" min="2" max="50"></input>
<input id="size" type="range" value="25" min="2" max="100"></input>

<button id="draw-gradient" class="ms-Button ms-Button--primary">
<span class="ms-Button-label ms-font-l">Draw gradient</span>
Expand Down Expand Up @@ -211,4 +211,4 @@ libraries: |-
@types/tinycolor2
spectrum-colorpicker@1.8.0/spectrum.js
spectrum-colorpicker@1.8.0/spectrum.css
@types/spectrum
@types/spectrum