Skip to content

Commit

Permalink
Removed printing statements added while testing imageSmoothingEnabled…
Browse files Browse the repository at this point in the history
… attribute
  • Loading branch information
AnyaPorter committed May 13, 2024
1 parent 2e886ce commit d4f9513
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 0 additions & 4 deletions ipycanvas/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ def send_command(self, canvas, command, buffers=[]):
]
)
self._current_canvas = canvas
print("passed through send_commnad", command, buffers)
self._send_custom(command, buffers)

def flush(self):
Expand All @@ -254,7 +253,6 @@ def flush(self):

def _send_custom(self, command, buffers=[]):
metadata, command_buffer = commands_to_buffer(command)
print("passed through _send_custom", command, metadata, [command_buffer]+buffers)
self.send(metadata, buffers=[command_buffer] + buffers)


Expand Down Expand Up @@ -1546,8 +1544,6 @@ def __setattr__(self, name, value):
value = widget_serialization["to_json"](value, None)
if name == "image_smoothing_enabled":
value = str(value)
print("command sent:", name, value)
print(type(value))
self._canvas_manager.send_command(
self, [COMMANDS["set"], [self.ATTRS[name], value]]
)
Expand Down
5 changes: 1 addition & 4 deletions src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
} from './utils';

function getContext(canvas: HTMLCanvasElement) {
var context = canvas.getContext('2d');
const context = canvas.getContext('2d');
if (context === null) {
throw 'Could not create 2d context.';
}
Expand Down Expand Up @@ -1103,9 +1103,6 @@ export class CanvasModel extends DOMWidgetModel {
}

async setAttr(attr: number, value: any) {
console.log("setting attribute")
console.log(CanvasModel.ATTRS[attr])
console.log(value)
if (typeof value === 'string' && value.startsWith('IPY')) {
const widgetModel: AsyncValueWidgetModel<any> = await unpack_models(
value,
Expand Down

0 comments on commit d4f9513

Please sign in to comment.