Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Release 0.59.0

See merge request Scientific-IT-Systems/gr!710
  • Loading branch information
FlorianRhiem committed Sep 1, 2021
2 parents e6afd3e + a6e1b05 commit d736a32
Show file tree
Hide file tree
Showing 17 changed files with 1,039 additions and 205 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ set(GR_SOURCES
lib/gr/strlib.c
lib/gr/text.c
lib/gr/mathtex2.c
lib/gr/mathtex2_kerning.c
lib/gr/mathtex2.tab.c
lib/gr/threadpool.c
${CMAKE_CURRENT_BINARY_DIR}/gr_version.h
Expand Down
2 changes: 1 addition & 1 deletion examples/griddata.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
cc griddata.c -I/usr/local/gr/include -L/usr/local/gr/lib -lGR
cc -I/usr/local/gr/include -L/usr/local/gr/lib -lGR -lm griddata.c -o griddata
*/

#include <stdlib.h>
Expand Down
6 changes: 3 additions & 3 deletions js/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ INCLUDES = -I$(THIRDPARTYDIR)/include/ -I$(GRMDIR) -I$(GR3DIR) -I$(GRDIR) -I$(GK
$(GRDIR)/strlib.o $(GRDIR)/contour.o $(GRDIR)/spline.o \
$(GRDIR)/import.o $(GRDIR)/grforbnd.o $(GRDIR)/md5.o \
$(GRDIR)/interp2.o $(GRDIR)/shade.o $(GRDIR)/delaunay.o \
$(GRDIR)/contourf.o $(GRDIR)/image.o $(GRDIR)/mathtex2.o $(GRDIR)/mathtex2.tab.o
$(GRDIR)/contourf.o $(GRDIR)/image.o $(GRDIR)/mathtex2.o $(GRDIR)/mathtex2_kerning.o $(GRDIR)/mathtex2.tab.o
GR3OBJS = $(GR3DIR)/gr3.o $(GR3DIR)/gr3_convenience.o \
$(GR3DIR)/gr3_html.o $(GR3DIR)/gr3_povray.o $(GR3DIR)/gr3_png.o \
$(GR3DIR)/gr3_jpeg.o $(GR3DIR)/gr3_gr.o $(GR3DIR)/gr3_mc.o $(GR3DIR)/gr3_sr.o
Expand Down Expand Up @@ -73,7 +73,7 @@ gr.js: module.js libGR.js api.js jsterm.js

fonts:
mkdir fonts
cp -p $(GKSDIR)/fonts/CMUSerif-Math.ttf $(GKSDIR)/fonts/DejaVuSans.ttf $(GKSDIR)/fonts/gksfont.dat fonts/
cp -p $(GKSDIR)/fonts/CMUSerif-Math.ttf $(GKSDIR)/fonts/DejaVuSans.ttf $(GKSDIR)/fonts/gksfont.dat $(GKSDIR)/fonts/mathtex2_offsets.bin fonts/

$(JPEGDIR)/libjpeg.a:
$(MAKE) -C $(JPEGDIR)
Expand All @@ -97,7 +97,7 @@ $(GRDIR)/gr.o: ../lib/gr/gr_version.h

libGR.js: $(OBJS) $(LIBS) library.js fonts
$(CC) $(OPTS) $(DEFINES) \
--embed-file fonts/gksfont.dat --embed-file fonts/CMUSerif-Math.ttf --embed-file fonts/DejaVuSans.ttf \
--embed-file fonts/gksfont.dat --embed-file fonts/CMUSerif-Math.ttf --embed-file fonts/DejaVuSans.ttf --embed-file fonts/mathtex2_offsets.bin \
--js-library library.js \
-o $@ $(OBJS) $(LIBS) \
-s EXPORTED_FUNCTIONS="['_gr_opengks', '_gr_closegks', '_gr_inqdspsize', '_gr_openws', '_gr_closews', '_gr_activatews', '_gr_deactivatews', '_gr_clearws', '_gr_updatews', '_gr_polyline', '_gr_polymarker', '_gr_text', '_gr_inqtext', '_gr_fillarea', '_gr_cellarray', '_gr_spline', '_gr_gridit', '_gr_setlinetype', '_gr_inqlinetype', '_gr_setlinewidth', '_gr_inqlinewidth', '_gr_setlinecolorind', '_gr_inqlinecolorind', '_gr_setmarkertype', '_gr_inqmarkertype', '_gr_setmarkersize', '_gr_setmarkercolorind', '_gr_inqmarkercolorind', '_gr_settextfontprec', '_gr_setcharexpan', '_gr_setcharspace', '_gr_settextcolorind', '_gr_setcharheight', '_gr_setcharup', '_gr_settextpath', '_gr_settextalign', '_gr_setfillintstyle', '_gr_setfillstyle', '_gr_setfillcolorind', '_gr_setcolorrep', '_gr_setscale', '_gr_inqscale', '_gr_setwindow', '_gr_inqwindow', '_gr_setviewport', '_gr_inqviewport', '_gr_selntran', '_gr_setclip', '_gr_setwswindow', '_gr_setwsviewport', '_gr_createseg', '_gr_copysegws', '_gr_redrawsegws', '_gr_setsegtran', '_gr_closeseg', '_gr_emergencyclosegks', '_gr_updategks', '_gr_setspace', '_gr_inqspace', '_gr_textext', '_gr_inqtextext', '_gr_axes', '_gr_grid', '_gr_verrorbars', '_gr_herrorbars', '_gr_polyline3d', '_gr_axes3d', '_gr_titles3d', '_gr_surface', '_gr_contour', '_gr_hexbin', '_gr_setcolormap', '_gr_inqcolormap', '_gr_colorbar', '_gr_inqcolor', '_gr_inqcolorfromrgb', '_gr_hsvtorgb', '_gr_tick', '_gr_validaterange', '_gr_adjustrange', '_gr_beginprint', '_gr_beginprintext', '_gr_endprint', '_gr_ndctowc', '_gr_wctondc', '_gr_drawrect', '_gr_fillrect', '_gr_drawarc', '_gr_fillarc', '_gr_drawpath', '_gr_setarrowstyle', '_gr_drawarrow', '_gr_readimage', '_gr_drawimage', '_gr_importgraphics', '_gr_setshadow', '_gr_settransparency', '_gr_setcoordxform', '_gr_begingraphics', '_gr_endgraphics', '_gr_drawgraphics', '_gr_mathtex', '_gr_beginselection', '_gr_endselection', '_gr_moveselection', '_gr_resizeselection', '_gr_inqbbox', '_gr_precision', '_gr_setregenflags', '_gr_inqregenflags', '_gr_savestate', '_gr_restorestate', '_gr_selectcontext', '_gr_destroycontext', '_gr_uselinespec', '_gr_selntran', '_gks_get_dash_list', '_gr_shade', '_gr_shadepoints', '_gr_shadelines', '_gr_panzoom', '_gr_path', '_gr_setborderwidth', '_gr_inqborderwidth', '_gr_setbordercolorind', '_gr_inqbordercolorind', '_gr_selectclipxform', '_gr_inqclipxform', '_grm_read', '_grm_args_new', '_grm_args_push', '_grm_args_delete', '_grm_plot', '_grm_get_stdout', '_grm_dump_json', '_grm_dump', '_grm_input', '_grm_merge', '_grm_merge_named', '_grm_switch', '_grm_get_box', '_grm_get_tooltip', '_grm_register', '_grm_unregister', '_grm_dump_json_str', '_grm_load_from_str']"
Expand Down
13 changes: 12 additions & 1 deletion js/jsterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ JSTerm = function(ispluto=false) {

var jsterm_ispluto = ispluto;

window.addEventListener('resize', function() {
// redraw plots if window zoom changed
if (window.devicePixelRatio != Module.dpr) {
for (pid in widgets) {
if (typeof(widgets[pid].canvas) !== 'undefined' && document.body.contains(widgets[pid].canvas)) {
widgets[pid].draw();
}
}
}
});

/**
* Sends a mouse-event via websocket
* @param {Object} data Data describing the event
Expand Down Expand Up @@ -1134,7 +1145,7 @@ JSTerm = function(ispluto=false) {
ready_callbacks.forEach(function (callback) {
callback();
});
ready_callbacks = null;
ready_callbacks = [];
};

if (document.readyState != 'loading') {
Expand Down
Loading

0 comments on commit d736a32

Please sign in to comment.