Release v0.8
Release v0.8
Changes in this release:
Database (PHP)
SNN_CC_DB_VERSION bumped 1.2 → 1.3
CREATE TABLE now includes pos_x_rel, pos_y_rel, elem_path columns
snn_cc_upgrade_database() runs ALTER TABLE to add the 3 columns on existing installs automatically
Save/Get handlers (PHP)
snn_cc_save_comment() reads pos_x_rel, pos_y_rel, elem_path from POST and stores them
Both snn_cc_get_comments() and snn_cc_get_all_comments() SELECT the new columns so JS receives them
Click capture (JS)
On click, the clicked element's offset + dimensions are used to compute relX / relY as a % within that element
getSelectorPath() builds a CSS selector for the clicked element (ID → class chain → nth-of-type, 4 levels deep)
showAddCommentPopup() now receives relX, relY, elemPath and stores them in the popup's data
Save/Reply (JS)
saveComment() signature changed to include relX, relY, elemPath and sends them as pos_x_rel, pos_y_rel, elem_path
Reply button inherits the parent comment's relative position data
Marker rendering (JS)
displayMarkers() checks for elem_path + pos_x_rel + pos_y_rel; if present, calls resolvePosition() to recompute the absolute pixel position based on the element's current offset — so on any screen width the marker sits on the correct spot in the centered content
Legacy comments without the new fields fall back to raw pos_x / pos_y
Full Changelog: v0.7...v0.8