You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jQuery('[data-action="edit"]').on('click', function(event) {
jQuery(econaImage).jrac({
'crop_width': 250,
'crop_height': 170,
'crop_x': 100,
'crop_y': 100,
'image_width': 400,
'viewport_onload': function() {
var $viewport = this;
var inputs = jQuery('.coords input:text');
var events = ['jrac_crop_x','jrac_crop_y','jrac_crop_width','jrac_crop_height','jrac_image_width','jrac_image_height'];
for (var i = 0; i < events.length; i++) {
var event_name = events[i];
// Register an event with an element.
$viewport.observator.register(event_name, inputs.eq(i));
// Attach a handler to that event for the element.
inputs.eq(i).bind(event_name, function(event, $viewport, value) {
jQuery(this).val(value);
})
// Attach a handler for the built-in jQuery change event, handler
// which read user input and apply it to relevent viewport object.
.change(event_name, function(event) {
var event_name = event.data;
$viewport.$image.scale_proportion_locked = $viewport.$container.parent('.pane').find('.coords input:checkbox').is(':checked');
$viewport.observator.set_property(event_name,jQuery(this).val());
});
}
$viewport.$container.append('<div>Image natural size: '
+$viewport.$image.originalWidth+' x '
+$viewport.$image.originalHeight+'</div>')
}
})
// React on all viewport events.
.bind('jrac_events', function(event, $viewport) {
var inputs = jQuery(this).parents('.pane').find('.coords input');
inputs.css('background-color',($viewport.observator.crop_consistent())?'chartreuse':'salmon');
});
jQuery('.coords').show();
econaToolbar.hide();
econaMoveButton.removeClass('active');
econaCropButton.addClass('active');
econaCropperButtons.show();
});
Is there a way to resolve this?
The text was updated successfully, but these errors were encountered:
After i destroy the instance i cant get it back again,i am destroying it like this...
And calling it like this:
Is there a way to resolve this?
The text was updated successfully, but these errors were encountered: